The GNUstep base library is a free software package implementing
the API of the OpenStep Foundation Kit (tm), including later
additions. This documentation package describes the core of the
base library, for documentation on additional classes, see the
BaseAdditions documentation package.
Inherits From: GSXMLParser: NSObject Declared in: GSXML.h
Description forthcoming.
+ (NSString*) loadEntity: (NSString*) publicId at: (NSString*) location Description forthcoming.
+ (GSXMLParser*) parser Description forthcoming.
+ (GSXMLParser*) parserWithContentsOfFile: (NSString*) path Description forthcoming.
+ (GSXMLParser*) parserWithContentsOfURL: (NSURL*) url Description forthcoming.
+ (GSXMLParser*) parserWithData: (NSData*) data Description forthcoming.
+ (GSXMLParser*) parserWithSAXHandler: (GSSAXHandler*) handler Description forthcoming.
+ (GSXMLParser*) parserWithSAXHandler: (GSSAXHandler*) handler withContentsOfFile: (NSString*) path Description forthcoming.
+ (GSXMLParser*) parserWithSAXHandler: (GSSAXHandler*) handler withContentsOfURL: (NSURL*) url Description forthcoming.
+ (GSXMLParser*) parserWithSAXHandler: (GSSAXHandler*) handler withData: (NSData*) data Description forthcoming.
+ (NSString*) xmlEncodingStringForStringEncoding: (NSStringEncoding) encoding Description forthcoming.
- (BOOL) doValidityChecking: (BOOL) yesno Description forthcoming.
- (GSXMLDocument*) document Description forthcoming.
- (int) errNo Description forthcoming.
- (BOOL) getWarnings: (BOOL) yesno Description forthcoming.
- (id) initWithSAXHandler: (GSSAXHandler*) handler Description forthcoming.
- (id) initWithSAXHandler: (GSSAXHandler*) handler withContentsOfFile: (NSString*) path Description forthcoming.
- (id) initWithSAXHandler: (GSSAXHandler*) handler withContentsOfURL: (NSURL*) url Description forthcoming.
- (id) initWithSAXHandler: (GSSAXHandler*) handler withData: (NSData*) data Description forthcoming.
- (BOOL) keepBlanks: (BOOL) yesno Description forthcoming.
- (BOOL) parse Description forthcoming.
- (BOOL) parse: (NSData*) data Description forthcoming.
- (BOOL) substituteEntities: (BOOL) yesno Description forthcoming.Inherits From: NSPortMessage: NSObject Declared in: NSPortMessage.h
Description forthcoming.
- (NSArray*) components Description forthcoming.
- (id) initWithMachMessage: (void*) buffer Description forthcoming.
- (id) initWithSendPort: (NSPort*) aPort receivePort: (NSPort*) anotherPort components: (NSArray*) items Description forthcoming.
- (unsigned) msgid Description forthcoming.
- (NSPort*) receivePort Description forthcoming.
- (BOOL) sendBeforeDate: (NSDate*) when Description forthcoming.
- (NSPort*) sendPort Description forthcoming.
- (void) setMsgid: (unsigned) anId Description forthcoming.Inherits From: None, is a root class
Conforms to: NSObject
Declared in: NSObject.h
NSObject is the root class (a root
class is a class with no superclass) of the gnustep
base library class hierarchy, so all classes normally
inherit from NSObject. There is an
exception though: NSProxy (which is
used for remote messaging) does not inherit from
NSObject.
Unless you are really sure of what you are doing,
all your own classes should inherit (directly or
indirectly) from NSObject (or in
special cases from NSProxy).
NSObject provides the basic common
functionality shared by all gnustep classes
and objects.
The essential methods which must be implemented by all
classes for their instances to be usable within
gnustep are declared in a separate protocol, which
is the NSObject protocol. Both
NSObject and NSProxy
conform to this protocol, which means all objects
in a gnustep application will conform to this protocol
(btw, if you don't find a method of
NSObject you are looking for in this
documentation, make sure you also look into
the documentation for the NSObject
protocol).
Theoretically, in special cases you might
need to implement a new root class. If you do, you
need to make sure that your root class conforms (at
least) to the NSObject protocol,
otherwise it will not interact correctly with the
gnustep framework. Said that, I must note that I
have never seen a case in which a new root class is
needed.
NSObject is a root class, which implies
that instance methods of NSObject are
treated in a special way by the Objective-C
runtime. This is an exception to the normal way
messaging works with class and instance methods:
if the Objective-C runtime can't find a class method for
a class object, as a last resort it looks for an instance
method of the root class with the same name, and
executes it if it finds it. This means that
instance methods of the root class (such as
NSObject) can be performed by class
objects which inherit from that root class ! This
can only happen if the class doesn't have a class
method with the same name, otherwise that method -
of course - takes the precedence. Because of this
exception, NSObject 's instance
methods are written in such a way that they work
both on NSObject 's instances and on
class objects.
+ (id) alloc Allocates a new instance of the receiver from the
default zone, by invoking
+allocWithZone:
with
NSDefaultMallocZone()
as the zone argument.
Returns the created
instance.
+ (id) allocWithZone: (NSZone*) z This is the basic method to create a new instance. It
allocates a new instance of the receiver from the
specified memory zone.
Memory for an instance of the receiver is
allocated; a pointer to this newly created
instance is returned. All instance variables are
set to 0 except the isa pointer which is
set to point to the object class. No initialization
of the instance is performed: it is your
responsibility to initialize the instance
by calling an appropriate init method. If
you are not using the garbage collector, it is also
your responsibility to make sure the returned
instance is destroyed when you finish using it,
by calling the release method to destroy
the instance directly, or by using
autorelease and autorelease pools.
You do not normally need to override this method in
subclasses, unless you are implementing a
class which for some reasons silently allocates
instances of another class (this is typically
needed to implement class clusters and similar
design schemes).
If you have turned on debugging of object allocation
(by calling the GSDebugAllocationActive
function), this method will also update the
various debugging counts and monitors of
allocated objects, which you can access using
the GSDebugAllocation... functions.
+ (Class) class Returns the receiver.
+ (NSString*) description Returns a string describing the receiving class.
The default implementation gives the name of the class
by calling
NSStringFromClass()
.
+ (void) initialize Description forthcoming.
+ (IMP) instanceMethodForSelector: (SEL) aSelector Returns a pointer to the C function implementing
the method used to respond to messages with
aSelector by instances of the receiving
class.
Raises NSInvalidArgumentException if
given a null selector.
+ (NSMethodSignature*) instanceMethodSignatureForSelector: (SEL) aSelector Returns a pointer to the C function implementing
the method used to respond to messages with
aSelector whihc are sent to instances of
the receiving class.
Raises
NSInvalidArgumentException if
given a null selector.
+ (BOOL) instancesRespondToSelector: (SEL) aSelector Returns a flag to say if instances of the receiver
class will respond to the specified selector. This
ignores situations where a subclass implements
-forwardInvocation:
to respond to selectors not normally handled... in these
cases the subclass may override this method to handle
it.
Raises NSInvalidArgumentException if given a
null selector.
+ (BOOL) isSubclassOfClass: (Class) aClass Returns YES if the receiver is
aClass or a subclass of aClass.
+ (id) new This method is a short-hand for alloc followed by
init, that is,
NSObject *object = [NSObject new];
is exactly the same as
NSObject *object = [[NSObject alloc] init];
This is a general convention: all
new... methods are supposed to return
a newly allocated and initialized instance, as would be
generated by an alloc method
followed by a corresponding init...
method. Please note that if you are not using a
garbage collector, this means that instances
generated by the new... methods
are not autoreleased, that is, you are responsible
for releasing (autoreleasing) the instances yourself.
So when you use new you typically do
something like:
NSMutableArray *array = AUTORELEASE
([NSMutableArray new]);
You do not normally need to override new
in subclasses, because if you override
init (and optionally
allocWithZone: if you really need),
new will automatically use your
subclass methods.
You might need instead to define new
new... methods specific to your
subclass to match any init...
specific to your subclass. For example, if your
subclass defines an instance method
initWithName:
it might be handy for you to have a class method
newWithName:
which combines alloc and
initWithName:. You would implement it
as follows:
+ (id) newWithName: (NSString *)aName {return [[self
alloc] initWithName: aName];}
+ (void) poseAsClass: (Class) aClassObject Sets up the ObjC runtime so that the receiver is used
wherever code calls for aClassObject to
be used.
+ (BOOL) requiresTypedMemory Description forthcoming.
+ (id) setVersion: (int) aVersion Sets the version number of the receiving class.
+ (Class) superclass Returns the super class from which the recevier was
derived.
+ (int) version Returns the version number of the receiving class.
- (id) autorelease Adds the receiver to the current autorelease pool, so
that it will be sent a
-release
message when the pool is destroyed.
Returns
the receiver.
In GNUstep, the
[NSObject% unknown entity: nbsp
+enableDoubleReleaseCheck:] method may be used to turn on checking for ratain/release errors in this method.
- (id) awakeAfterUsingCoder: (NSCoder*) aDecoder Called after the receiver has been created by
decoding some sort of archive. Returns self.
Subclasses may override this to perform some
special initialisation upon being decoded.
- (Class) class Returns the class of which the receiver is an
instance.
The default implementation
returns the private isa instance
variable of NSObject, which is used to store a
pointer to the objects class.
NB. When
NSZombie is enabled (see NSDebug.h) this pointer
is changed upon object deallocation.
- (Class) classForArchiver Description forthcoming.
- (Class) classForCoder Description forthcoming.
- (Class) classForPortCoder Description forthcoming.
- (NSString*) className Returns the name of the class of the receiving
object by using the
NSStringFromClass()
function.
This is a MacOS-X addition for
apple scripting, which is also generally useful.
- (BOOL) conformsToProtocol: (Protocol*) aProtocol Returns a flag to say whether the class of the
receiver conforms to aProtocol.
- (id) copy Creates and returns a copy of the reciever by
calling
-copyWithZone:
passing
NSDefaultMallocZone()
- (void) dealloc Deallocates the receiver by calling
NSDeallocateObject()
with self as the argument.
You should normally call the superclass
implementation of this method when you
override it in a subclass, or the memory
occupied by your object will not be released.
NSObject 's implementation of this
method destroys the receiver, by returning the
memory allocated to the receiver to the system.
After this method has been called on an instance,
you must not refer the instance in any way, because
it does not exist any longer. If you do, it is a bug
and your program might even crash with a segmentation
fault.
If you have turned on the debugging facilities for
instance allocation, NSObject 's
implementation of this method will also
update the various counts and monitors of
allocated instances (see the
GSDebugAllocation... functions for
more info).
Normally you are supposed to manage the memory
taken by objects by using the high level interface
provided by the retain,
release and autorelease
methods (or better by the corresponding macros
RETAIN, RELEASE and
AUTORELEASE), and by autorelease
pools and such; whenever the release/autorelease
mechanism determines that an object is no
longer needed (which happens when its retain count
reaches 0), it will call the dealloc
method to actually deallocate the object. This
means that normally, you should not need to call
dealloc directly as the gnustep base
library automatically calls it for you when the
retain count of an object reaches 0.
Because the dealloc method will be
called when an instance is being destroyed, if
instances of your subclass use objects or
resources (as it happens for most useful
classes), you must override
dealloc in subclasses to release all
objects and resources which are used by the
instance, otherwise these objects and resources
would be leaked. In the subclass implementation,
you should first release all your subclass specific
objects and resources, and then invoke super's
implementation (which will do the same,
and so on up in the class hierarchy to
NSObject 's implementation, which
finally destroys the object). Here is an example
of the implementation of dealloc for a
subclass whose instances have a single instance
variable name which needs to be
released when an instance is deallocated:
- (void) dealloc {RELEASE (name); [super dealloc];}dealloc might contain code to release
not only objects, but also other resources, such as
open files, network connections, raw memory
allocated in other ways, etc.
If you have allocated the memory using a non-standard
mechanism, you will not call the superclass
(NSObject) implementation of the method as you
will need to handle the deallocation specially.
In some circumstances, an object may wish
to prevent itsself from being deallocated, it can do
this simply be refraining from calling the
superclass implementation.
- (NSString*) description Returns a string describing the receiver. The
default implementation gives the class and memory
location of the receiver.
- (void) doesNotRecognizeSelector: (SEL) aSelector Raises an invalid argument exception providing
infomration about the receivers inability to
handle aSelector.
- (void) forwardInvocation: (NSInvocation*) anInvocation This method is called automatically to handle a
message sent to the receiver for which the
receivers class has no method.
The default
implemnentation calls
-doesNotRecognizeSelector:
- (unsigned) hash Returns the hash of the receiver. Subclasses should
ensure that their implementations of this method
obey the rule that if the
-isEqual:
method returns YES for two instances of
the class, the
-hash
method returns the same value fro both instances.
The default implementation returns the
address of the instance.
- (id) init Initialises the receiver... the NSObject
implementation simply returns self.
- (BOOL) isEqual: (id) anObject Tests anObject and the receiver for
equality. The default implementation considers
two objects to be equal only if they are the same
object (ie occupy the same memory location).
If a subclass overrides this method, it should also
override the
-hash
method so that if two objects are equal they both
have the same hash.
- (BOOL) isKindOfClass: (Class) aClass Returns YES if the class of the
receiver is either the same as aClass
or is derived from (a subclass of) aClass.
- (BOOL) isMemberOfClass: (Class) aClass Returns YES if the class of the
receiver is aClass
- (BOOL) isProxy Returns a flag to differentiate between 'true'
objects, and objects which are proxies for other
objects (ie they forward messages to the other
objects).
The default implementation
returns NO.
- (IMP) methodForSelector: (SEL) aSelector Returns a pointer to the C function implementing
the method used to respond to messages with
aSelector.
Raises
NSInvalidArgumentException if
given a null selector.
- (NSMethodSignature*) methodSignatureForSelector: (SEL) aSelector Returns the method signature describing how the
receiver would handle a message with
aSelector.
Raises
NSInvalidArgumentException if
given a null selector.
- (id) mutableCopy Creates and rturns a mutable copy of the receiver
by calling
-mutableCopyWithZone:
passing
NSDefaultMallocZone()
.
- (id) performSelector: (SEL) aSelector Causes the receiver to execute the method
implementation corresponding to
aSelector and returns the result.
The method must be one which takes no arguments and
returns an object.
Raises
NSInvalidArgumentException if
given a null selector.
- (id) performSelector: (SEL) aSelector withObject: (id) anObject Causes the receiver to execute the method
implementation corresponding to
aSelector and returns the result.
The method must be one which takes one argument and
returns an object.
Raises
NSInvalidArgumentException if
given a null selector.
- (id) performSelector: (SEL) aSelector withObject: (id) object1 withObject: (id) object2 Causes the receiver to execute the method
implementation corresponding to
aSelector and returns the result.
The method must be one which takes two arguments and
returns an object.
Raises
NSInvalidArgumentException if
given a null selector.
- (void) release Decrements the retain count for the receiver if
greater than zeron, otherwise calls the dealloc
method instead.
The default implementation
calls the
NSDecrementExtraRefCountWasZero()
function to test the extra reference count for the
receiver (and decrement it if non-zero) - if the
extra reference count is zero then the retain count
is one, and the dealloc method is called.
In
GNUstep, the
[NSObject% unknown entity: nbsp
+enableDoubleReleaseCheck:] method may be used to turn on checking for ratain/release errors in this method.
- (id) replacementObjectForArchiver: (NSArchiver*) anArchiver Description forthcoming.
- (id) replacementObjectForCoder: (NSCoder*) anEncoder Description forthcoming.
- (id) replacementObjectForPortCoder: (NSPortCoder*) aCoder Returns the actual object to be encoded for sending
over the network on a Distributed Objects connection.
The default implementation returns self if
the receiver is being sent bycopy and returns
a proxy otherwise.
Subclasses may override this
method to change this behavior, eg. to ensure that
they are always copied.
- (BOOL) respondsToSelector: (SEL) aSelector Returns a flag to say if the receiver will respond
to the specified selector. This ignores situations where
a subclass implements
-forwardInvocation:
to respond to selectors not normally handled... in these
cases the subclass may override this method to handle
it.
Raises NSInvalidArgumentException if given a
null selector.
- (id) retain Increments the reference count and returns the
receiver.
The default implementation does
this by calling
NSIncrementExtraRefCount()
- (unsigned) retainCount Returns the reference count for the receiver. Each
instance has an implicit reference count of 1, and
has an 'extra refrence count' returned by the
NSExtraRefCount()
function, so the value returned by this method is
always greater than zero.
By convention,
objects which should (or can) never be deallocated
return the maximum unsigned integer value.
- (id) self Returns the reciever.
- (Class) superclass Returns the super class from which the receviers
class was derived.
- (NSZone*) zone Returns the memory allocation zone in which the
receiver is located.
Inherits From: GSHTMLSAXHandler: GSSAXHandler: NSObject Declared in: GSXML.h
Description forthcoming.Inherits From: NSFormatter: NSObject Conforms to: NSCopyingNSCoding
Declared in: NSFormatter.h
Description forthcoming.
- (NSAttributedString*) attributedStringForObjectValue: (id) anObject withDefaultAttributes: (NSDictionary*) attr Description forthcoming.
- (NSString*) editingStringForObjectValue: (id) anObject Description forthcoming.
- (BOOL) getObjectValue: (id*) anObject forString: (NSString*) string errorDescription: (NSString**) error Description forthcoming.
- (BOOL) isPartialStringValid: (NSString*) partialString newEditingString: (NSString**) newString errorDescription: (NSString**) error Description forthcoming.
- (BOOL) isPartialStringValid: (NSString**) partialStringPtr proposedSelectedRange: (NSRange*) proposedSelRangePtr originalString: (NSString*) origString originalSelectedRange: (NSRange) originalSelRangePtr errorDescription: (NSString**) error Description forthcoming.
- (NSString*) stringForObjectValue: (id) anObject Description forthcoming.Inherits From: NSDirectoryEnumerator: NSEnumerator: NSObject Declared in: NSFileManager.h
NSDirectoryEnumerator implementation
The Objective-C interface hides a traditional C
implementation. This was the only way I could
get near the speed of standard unix tools for big
directories.
- (NSDictionary*) directoryAttributes Returns a dictionary containing the attributes of
the directory at which enumeration started.
The
contents of this dictionary are as produced by
[NSFileManager% unknown entity: nbsp
-fileAttributesAtPath:traverseLink:]
- (NSDictionary*) fileAttributes Returns a dictionary containing the attributes of
the file currently being enumerated.
The
contents of this dictionary are as produced by
[NSFileManager% unknown entity: nbsp
-fileAttributesAtPath:traverseLink:]
- (id) initWithDirectoryPath: (NSString*) path recurseIntoSubdirectories: (BOOL) recurse followSymlinks: (BOOL) follow justContents: (BOOL) justContents Description forthcoming.
- (void) skipDescendents Informs the receiver that any descendents of the
current directory should be skipped rather than
enumerated. Use this to avaoid enumerating the
contents of directories you are not interested in.
Inherits From: NSPipe: NSObject Declared in: NSFileHandle.h
The NSPipe provides an encapsulation of the UNIX concept
of pipe. With NSPipe, it is possible to redirect the
standard input or standard output.
+ (id) pipe Returns a newly allocated and initialized NSPipe
object that has been sent an autorelease message.
- (NSFileHandle*) fileHandleForReading Description forthcoming.
- (NSFileHandle*) fileHandleForWriting Description forthcoming.Inherits From: NSRecursiveLock: NSObject Conforms to: NSLockingGCFinalization
Declared in: NSLock.h
See NSLock for more information about what a lock is. A
recursive lock extends NSLock in that you can lock
a recursive lock multiple times. Each lock must be balanced
by a cooresponding unlock, and the lock is not released
for another thread to aquire until the last unlock call
is made (corresponding to the first lock message).
- (void) lock Description forthcoming.
- (BOOL) lockBeforeDate: (NSDate*) limit Attempts to aquire a lock before the date
limit passes. It returns YES
if it can. It returns NO if it cannot (but
it waits until the time limit is up before
returning NO).
- (BOOL) tryLock Attempts to aquire a lock, but returns
NO immediately if the lock cannot be
aquired. It returns YES if the lock
is aquired. Can be called multiple times to make nested
locks.
- (void) unlock Description forthcoming.Inherits From: NSIntNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSDoubleNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSMutableBitmapCharSet: NSMutableCharacterSet: NSCharacterSet: NSObject Declared in: NSBitmapCharSet.h
Description forthcoming.
- (id) initWithBitmap: (NSData*) bitmap Description forthcoming.Inherits From: NSURL: NSObject Conforms to: NSCodingNSCopyingNSURLHandleClient
Declared in: NSURL.h
This class permits manipulation of URLs and the
resources to which they refer. They can be used to
represent absolute URLs or relative URLs which are
based upon an absolute URL. The relevant RFCs
describing how a URL is formatted, and what is
legal in a URL are - 1808, 1738, and 2396.
Handling of the underlying resources is carried out
by NSURLHandle objects, but NSURL provides a simoplified
API wrapping these objects.
+ (id) URLWithString: (NSString*) aUrlString Create and return a URL with the supplied string,
which should be a string (containing percent escape
codes where necessary) conforming to the description
(in RFC2396) of an absolute URL.
Calls
-initWithString:
+ (id) URLWithString: (NSString*) aUrlString relativeToURL: (NSURL*) aBaseUrl Create and return a URL with the supplied string,
which should be a string (containing percent escape
codes where necessary) conforming to the description
(in RFC2396) of a relative URL.
Calls
-initWithString:relativeToURL:
+ (id) fileURLWithPath: (NSString*) aPath Create and return a file URL with the supplied path.
The value of aPath must be a valid
filesystem path.
Calls
-initFileURLWithPath:
- (NSURLHandle*) URLHandleUsingCache: (BOOL) shouldUseCache Returns an NSURLHandle instance which may be used
to write data to the resource represented by the
receiver URL, or read data from it.
The
shouldUseCache flag indicates whether a
cached handle may be returned or a new one should be
created.
- (NSString*) absoluteString Returns the full string describing the receiver
resiolved against its base.
- (NSURL*) absoluteURL If the receiver is an absolute URL, returns self.
Otherwise returns an absolute URL referring to
the same resource as the receiver.
- (NSURL*) baseURL If the receiver is a relative URL, returns its base URL.
Otherwise, returns nil.
- (NSString*) fragment Returns the fragment portion of the receiver or
nil if there is no fragment supplied in
the URL.
The fragment is everything in the
original URL string after a '#'
File URLs
do not have fragments.
- (NSString*) host Returns the host portion of the receiver or
nil if there is no host supplied in the
URL.
Percent escape sequences in the user
string are translated and the string treated as
UTF8.
- (id) initFileURLWithPath: (NSString*) aPath Initialise as a file URL with the specified path
(which must be a valid path on the local
filesystem).
Converts relative paths to
absolute ones.
Appends a trailing slash to
the path when necessary if it specifies a directory.
Calls
-initWithScheme:host:path:
- (id) initWithScheme: (NSString*) aScheme host: (NSString*) aHost path: (NSString*) aPath Initialise by building a URL string from the
supplied parameters and calling
-initWithString:relativeToURL:
- (id) initWithString: (NSString*) aUrlString Initialise as an absolute URL.
Calls
-initWithString:relativeToURL:
- (id) initWithString: (NSString*) aUrlString relativeToURL: (NSURL*) aBaseUrl Initialised using aUrlString and
aBaseUrl. The value of aBaseUrl
may be nil, but aUrlString must
be non-nil.
If the string cannot be parsed the
method returns nil.
- (BOOL) isFileURL Returns YES if the recevier is a file
URL, NO otherwise.
- (void) loadResourceDataNotifyingClient: (id) client usingCache: (BOOL) shouldUseCache Loads resource data for the specified
client.
If shouldUseCache is YES then
an attempt will be made to locate a cached NSURLHandle
to provide the resource data, otherwise a new handle
will be created and cached.
If the handle does not have the data available, it
will be asked to load the data in the background by
calling its loadInBackground method.
The specified client (if non-nil) will be
set up to receive notifications of the progress of
the background load process.
- (NSString*) parameterString Returns the parameter portion of the receiver or
nil if there is no parameter supplied
in the URL.
The parameters are everything in the
original URL string after a ';' but before the
query.
File URLs do not have parameters.
- (NSString*) password Returns the password portion of the receiver or
nil if there is no password supplied in
the URL.
Percent escape sequences in the user
string are translated and the string treated as UTF8
in GNUstep but this appears to be broken in MacOS-X.
NB. because of its security implications it
is recommended that you do not use URLs with users and
passwords unless necessary.
- (NSString*) path Returns the path portion of the receiver.
Replaces percent escapes with unescaped values,
interpreting non-ascii character sequences as
UTF8.
NB. This does not conform strictly to
the RFCs, in that it includes a leading slash ('/')
character (wheras the path part of a URL strictly
should not) and the interpretation of non-ascii
character is (strictly speaking) undefined.
Also, this breaks strict conformance in that
a URL of file scheme is treated as having a path
(contrary to RFCs)
- (NSNumber*) port Returns the port portion of the receiver or
nil if there is no port supplied in the
URL.
Percent escape sequences in the user
string are translated in GNUstep but this appears to
be broken in MacOS-X.
- (id) propertyForKey: (NSString*) propertyKey Asks a URL handle to return the property for the
specified key and returns the result.
- (NSString*) query Returns the query portion of the receiver or
nil if there is no query supplied in
the URL.
The query is everything in the original
URL string after a '?' but before the fragment.
File URLs do not have queries.
- (NSString*) relativePath Returns the path of the receiver, without taking
any base URL into account. If the receiver is an
absolute URL,
-relativePath
is the same as -path
.
Returns nil if there is no path
specified for the URL.
- (NSString*) relativeString Returns the relative portion of the URL string. If
the receiver is not a relative URL, this returns the
same as absoluteString.
- (NSData*) resourceDataUsingCache: (BOOL) shouldUseCache Loads the resource data for the represented URL and
returns the result. The shoulduseCache flag
determines whether an existing cached
NSURLHandle can be used to provide the data.
- (NSString*) resourceSpecifier Returns the resource specifier of the URL... the
part which lies after the scheme.
- (NSString*) scheme Returns the scheme of the receiver.
- (BOOL) setProperty: (id) property forKey: (NSString*) propertyKey Calls
[NSURLHandle% unknown entity: nbsp
-writeProperty:forKey:] to set the named property.
- (BOOL) setResourceData: (NSData*) data Calls
[NSURLHandle% unknown entity: nbsp
-writeData:]
to write the specified data object to the
resource identified by the receiver URL.
Returns the result.
- (NSURL*) standardizedURL Returns a URL with '/./' and '/../' sequences
resolved etc.
- (NSString*) user Returns the user portion of the receiver or
nil if there is no user supplied in the
URL.
Percent escape sequences in the user
string are translated and the whole is treated as
UTF8 data.
NB. because of its security
implications it is recommended that you do not
use URLs with users and passwords unless necessary.
Inherits From: None, is a root class
Conforms to: NSObject
Declared in: NSProxy.h
The NSProxy class provides a basic implementation of a
class whose instances are used to stand in for
other objects.
The class provides the most basic
methods of NSObject, and expects messages for other
methods to be forwarded to the real object
represented by the proxy. You must subclass
NSProxy to implement
-forwardInvocation:
to these real objects.
+ (id) alloc Allocates and returns an NSProxy instance in the
default zone.
+ (id) allocWithZone: (NSZone*) z Allocates and returns an NSProxy instance in the
specified zone z.
+ (id) autorelease Returns the receiver
+ (Class) class Returns the receiver
+ (NSString*) description Returns a string describing the receiver.
+ (BOOL) isKindOfClass: (Class) aClass Returns NO... the NSProxy class cannot
be an instance of any class.
+ (BOOL) isMemberOfClass: (Class) aClass Returns YES if aClass is
identical to the receiver, NO
otherwise.
+ (void) load A dummy method...
+ (void) release A dummy method to ensure that the class can safely be
held in containers.
+ (BOOL) respondsToSelector: (SEL) aSelector Returns YES if the receiver responds
to aSelector, NO otherwise.
+ (id) retain Returns the receiver.
+ (unsigned int) retainCount Returns the maximum unsigned integer value.
- (id) autorelease Adds the receiver to the current autorelease pool and
returns self.
- (Class) class Returns the class of the receiver.
- (BOOL) conformsToProtocol: (Protocol*) aProtocol Calls the
-forwardInvocation:
method to determine if the 'real' object referred to
by the proxy conforms to aProtocol. Returns
the result.
NB. The default operation of
-forwardInvocation:
is to raise an exception.
- (void) dealloc Frees the memory used by the receiver.
- (NSString*) description Returns a text descrioption of the receiver.
- (void) forwardInvocation: (NSInvocation*) anInvocation Raises an NSInvalidArgumentException
- (unsigned int) hash Returns the address of the receiver... so it can be
stored in a dictionary.
- (id) init Initialises the receiver and returns the
resulting instance.
- (BOOL) isEqual: (id) anObject Tests for pointer equality with anObject
- (BOOL) isKindOfClass: (Class) aClass Calls the
-forwardInvocation:
method to determine if the 'real' object referred to
by the proxy is an instance of the specified class.
Returns the result.
NB. The default
operation of
-forwardInvocation:
is to raise an exception.
- (BOOL) isMemberOfClass: (Class) aClass Calls the
-forwardInvocation:
method to determine if the 'real' object referred to
by the proxy is an instance of the specified class.
Returns the result.
NB. The default
operation of
-forwardInvocation:
is to raise an exception.
- (BOOL) isProxy Returns YES
- (NSMethodSignature*) methodSignatureForSelector: (SEL) aSelector If we respond to the method directly, create and return
a method signature. Otherwise raise an exception.
- (void) release Decrement the retain count for the receiver...
deallocate if it would become negative.
- (BOOL) respondsToSelector: (SEL) aSelector If we respond to the method directly, return
YES, otherwise forward this request to
the object we are acting as a proxy for.
- (id) retain Increment the retain count for the receiver.
- (unsigned int) retainCount Return the retain count for the receiver.
- (id) self Returns the receiver.
- (Class) superclass Returns the superclass of the receivers class.
- (NSZone*) zone Returns the zone in which the receiver was
allocated.
Inherits From: NSFileManager: NSObject Declared in: NSFileManager.h
This is the main class for management of the local
filesystem.
+ (NSFileManager*) defaultManager Returns a shared default file manager which may be
used throughout an application.
- (BOOL) changeCurrentDirectoryPath: (NSString*) path Changes the current directory used for all
subsequent operations.
All non-absolute
paths are interpreted relative to this directory.
The current directory is set on a per-task
basis, so the current directory for other file
manager instances will also be changed by this
method.
- (BOOL) changeFileAttributes: (NSDictionary*) attributes atPath: (NSString*) path Change the attributes of the file at
path to those specified.
Returns
YES if all requested changes were made
(or if the dictionary was nil or empty, so
no changes were requested), NO otherwise.
On failure, some fo the requested changes may
have taken place.
- (NSArray*) componentsToDisplayForPath: (NSString*) path Returns an array of path components
suitably modified for display to the end user.
This modification may render the returned strings
unusable for path manipulation, so you
should work with two arrays... one returned by this
method (for display tio the user), and a parallel
one returned by
[NSString% unknown entity: nbsp
-pathComponents]
(for path manipulation).
- (NSData*) contentsAtPath: (NSString*) path Reads the file at path an returns its
contents as an NSData object.
If an error
occurs or if path specifies a directory
etc then nil is returned.
- (BOOL) contentsEqualAtPath: (NSString*) path1 andPath: (NSString*) path2 Returns YES if the contents of the
file or directory at path1 are the same as
those at path2.
If path1
and path2 are files, this is a simple
comparison. If they are directories, the
contents of the files in those subdirectories are
compared recursively.
Symbolic links are
not followed.
A comparison checks first file
identity, then size, then content.
- (BOOL) copyPath: (NSString*) source toPath: (NSString*) destination handler: (id) handler Copies the file or directory at source to
destination, using a handler
object which should respond to
[NSObject% unknown entity: nbsp
-fileManager:willProcessPath:] and [NSObject% unknown entity: nbsp
-fileManager:shouldProceedAfterError:] messages.
- (BOOL) createDirectoryAtPath: (NSString*) path attributes: (NSDictionary*) attributes Creates a new directory, and sets its
attributes as specified.
Creates
other directories in the path as
necessary.
Returns YES on
success, NO on failure.
- (BOOL) createFileAtPath: (NSString*) path contents: (NSData*) contents attributes: (NSDictionary*) attributes Creates a new file, and sets its
attributes as specified.
Initialises the file content with the specified
data.
Returns YES on success,
NO on failure.
- (BOOL) createSymbolicLinkAtPath: (NSString*) path pathContent: (NSString*) otherPath Creates a symbolic link at path which
links to the location specified by
otherPath.
- (NSString*) currentDirectoryPath Returns the current working directory used by all
instance of the file manager in the current task.
- (NSArray*) directoryContentsAtPath: (NSString*) path Returns an array of the contents of the specified
directory.
The listing does
not recursively list
subdirectories.
The special files
'.' and '..' are not listed.
Indicates an error
by returning nil (eg. if path is
not a directory or it can't be read for some reason).
- (NSString*) displayNameAtPath: (NSString*) path Returns the name of the file or directory at
path. Converts it into a format for
display to an end user. This may render it unusable
as part of a file/path name.
For instance, if a
user has elected not to see file extensions, this
method may return filenames with the extension
removed.
The default operation is to return
the result of calling
[NSString% unknown entity: nbsp
-lastPathComponent] on the path.
- (NSDirectoryEnumerator*) enumeratorAtPath: (NSString*) path Returns an enumerator which can be used to return
each item with the directory at path in
turn.
The enumeration is recursive...
following all nested subdirectories.
- (NSDictionary*) fileAttributesAtPath: (NSString*) path traverseLink: (BOOL) flag If a file (or directory etc) exists at the specified
path, and can be queriesd for its
attributes, this method returns a dictionary
containing the various attributes of that file.
Otherwise nil is returned.
If
the flag is NO and the file is
a symbolic link, the attributes of the link itsself
(rather than the file it points to) are returned.
The dictionary keys for attributes are -
The NSDictionary class also has a set of accessor
methods which enable you to get at file attribute
information more efficiently than using the
keys above to extract it. You should generally use
the accessor methods where they are available.
- (BOOL) fileExistsAtPath: (NSString*) path Returns YES if a file (or directory
etc) exists at the specified path.
- (BOOL) fileExistsAtPath: (NSString*) path isDirectory: (BOOL*) isDirectory Returns YES if a file (or directory
etc) exists at the specified path.
If the isDirectory argument is not a nul
pointer, stores a flag in the location it points
to, to indicate whether the file is a directory or not.
- (NSDictionary*) fileSystemAttributesAtPath: (NSString*) path Returns a dictionary containing the filesystem
attributes for the specified path (or
nil if the path is not
valid).
- (const char*) fileSystemRepresentationWithPath: (NSString*) path Convert from OpenStep internal path
format (unix-style) to a string in the local
filesystem format, suitable for passing to
system functions.
Under unix, this simply
standardizes the path and converts
to a C string.
Under windoze, this attempts to
use local conventions to convert to a windows
path. In GNUstep, the conventional unix
syntax '~user/...' can be used to indicate a windoze
drive specification by using the drive letter in
place of the username.
- (BOOL) isDeletableFileAtPath: (NSString*) path Returns YES if a file (or directory
etc) exists at the specified path and is
deletable.
- (BOOL) isExecutableFileAtPath: (NSString*) path Returns YES if a file (or directory
etc) exists at the specified path and is
executable (if a directory is executable, you
can access its contents).
- (BOOL) isReadableFileAtPath: (NSString*) path Returns YES if a file (or directory
etc) exists at the specified path and is
readable.
- (BOOL) isWritableFileAtPath: (NSString*) path Returns YES if a file (or directory
etc) exists at the specified path and is
writable.
- (BOOL) linkPath: (NSString*) source toPath: (NSString*) destination handler: (id) handler Links the file or directory at source to
destination, using a handler
object which should respond to
[NSObject% unknown entity: nbsp
-fileManager:willProcessPath:] and [NSObject% unknown entity: nbsp
-fileManager:shouldProceedAfterError:] messages.
- (BOOL) movePath: (NSString*) source toPath: (NSString*) destination handler: (id) handler Moves the file or directory at source to
destination, using a handler
object which should respond to
[NSObject% unknown entity: nbsp
-fileManager:willProcessPath:] and [NSObject% unknown entity: nbsp
-fileManager:shouldProceedAfterError:] messages.
- (NSString*) pathContentOfSymbolicLinkAtPath: (NSString*) path Returns the name of the file or directory that the
symbolic link at path points to.
- (BOOL) removeFileAtPath: (NSString*) path handler: (id) handler Removes the file or directory at path,
using a handler object which should
respond to
[NSObject% unknown entity: nbsp
-fileManager:willProcessPath:] and [NSObject% unknown entity: nbsp
-fileManager:shouldProceedAfterError:] messages.
- (NSString*) stringWithFileSystemRepresentation: (const char*) string length: (unsigned int) len This method converts from a local system specific
filename representation to the internal OpenStep
representation (unix-style). This should be
used whenever a filename is read in from the local
system.
In GNUstep, windoze drive specifiers
are encoded in the internal path using the
conventuional unix syntax of '~user/...'
where the drive letter is used instead of a username.
- (NSArray*) subpathsAtPath: (NSString*) path Returns an array containing the (relative) paths of
all the items in the directory at path.
The listing follows all subdirectories, so it
can produce a very large array... use with care.
Inherits From: NSSet: NSObject Conforms to: NSCodingNSCopyingNSMutableCopying
Declared in: NSSet.h
Description forthcoming.
+ (id) set Description forthcoming.
+ (id) setWithArray: (NSArray*) objects Description forthcoming.
+ (id) setWithObject: (id) anObject Description forthcoming.
+ (id) setWithObjects: (id) firstObject Description forthcoming.
+ (id) setWithSet: (NSSet*) aSet Description forthcoming.
- (NSArray*) allObjects Description forthcoming.
- (id) anyObject Description forthcoming.
- (BOOL) containsObject: (id) anObject Description forthcoming.
- (unsigned) count Returns the number of objects stored in the set.
- (NSString*) descriptionWithLocale: (NSDictionary*) locale Description forthcoming.
- (id) initWithArray: (NSArray*) other Initialises a newly allocated set by adding all
the objects in the supplied array to the set.
- (id) initWithObjects: (id) firstObject Description forthcoming.
- (id) initWithObjects: (id*) objects count: (unsigned) count Description forthcoming.
- (id) initWithObjects: (id) firstObject rest: (va_list) ap Description forthcoming.
- (id) initWithSet: (NSSet*) other Description forthcoming.
- (id) initWithSet: (NSSet*) other copyItems: (BOOL) flag Initialises a newly allocated set by adding all
the objects in the supplied set.
- (BOOL) intersectsSet: (NSSet*) otherSet Description forthcoming.
- (BOOL) isEqualToSet: (NSSet*) other Description forthcoming.
- (BOOL) isSubsetOfSet: (NSSet*) otherSet Description forthcoming.
- (void) makeObjectsPerform: (SEL) aSelector Description forthcoming.
- (void) makeObjectsPerform: (SEL) aSelector withObject: (id) argument Description forthcoming.
- (id) member: (id) anObject Description forthcoming.
- (NSEnumerator*) objectEnumerator Description forthcoming.Inherits From: GSXMLDocument: NSObject Conforms to: NSCopying
Declared in: GSXML.h
Description forthcoming.
+ (GSXMLDocument*) documentWithVersion: (NSString*) version Description forthcoming.
- (NSString*) description Description forthcoming.
- (NSString*) encoding Description forthcoming.
- (void*) lib Description forthcoming.
- (GSXMLNode*) makeNodeWithNamespace: (GSXMLNamespace*) ns name: (NSString*) name content: (NSString*) content Description forthcoming.
- (GSXMLNode*) root Description forthcoming.
- (GSXMLNode*) setRoot: (GSXMLNode*) node Description forthcoming.
- (NSString*) version Description forthcoming.
- (BOOL) writeToFile: (NSString*) filename atomically: (BOOL) useAuxilliaryFile Description forthcoming.
- (BOOL) writeToURL: (NSURL*) url atomically: (BOOL) useAuxilliaryFile Description forthcoming.Inherits From: NSBitmapCharSet: NSCharacterSet: NSObject Declared in: NSBitmapCharSet.h
Description forthcoming.
- (id) initWithBitmap: (NSData*) bitmap Description forthcoming.Inherits From: GSFrameInvocation: NSInvocation: NSObject Declared in: GSInvocation.h
Description forthcoming.Inherits From: GCObject: NSObject Declared in: GCObject.h
Description forthcoming.
+ (void) gcCollectGarbage Description forthcoming.
+ (BOOL) gcIsCollecting Description forthcoming.
+ (void) gcObjectWillBeDeallocated: (GCObject*) anObject Description forthcoming.
- (void) gcDecrementRefCount Description forthcoming.
- (void) gcDecrementRefCountOfContainedObjects Description forthcoming.
- (void) gcIncrementRefCount Description forthcoming.
- (BOOL) gcIncrementRefCountOfContainedObjects Description forthcoming.Inherits From: NSData: NSObject Conforms to: NSCodingNSCopyingNSMutableCopying
Declared in: NSData.h
Description forthcoming.
+ (id) data Returns an empty data object.
+ (id) dataWithBytes: (const void*) bytes length: (unsigned int) length Returns an autoreleased data object containing data
copied from bytes and with the specified
length. Invokes
-initWithBytes:length:
+ (id) dataWithBytesNoCopy: (void*) bytes length: (unsigned int) length Returns an autoreleased data object encapsulating
the data at bytes and with the specified
length. Invokes
-initWithBytesNoCopy:length:freeWhenDone: with YES
+ (id) dataWithBytesNoCopy: (void*) aBuffer length: (unsigned int) bufferSize freeWhenDone: (BOOL) shouldFree Returns an autoreleased data object encapsulating
the data at bytes and with the specified length.
Invokes
-initWithBytesNoCopy:length:freeWhenDone:
+ (id) dataWithContentsOfFile: (NSString*) path Returns a data object encapsulating the contents of
the specified file. Invokes
-initWithContentsOfFile:
+ (id) dataWithContentsOfMappedFile: (NSString*) path Returns a data object encapsulating the contents of
the specified file mapped directly into memory. Invokes
-initWithContentsOfMappedFile:
+ (id) dataWithContentsOfURL: (NSURL*) url Retrieves the information at the specified
url and returns an NSData instance
encapsulating it.
+ (id) dataWithData: (NSData*) data Returns an autoreleased instance initialised by
copying the contents of data.
- (const void*) bytes Returns a pointer to the data encapsulated by the
receiver.
- (NSString*) description Description forthcoming.
- (unsigned int) deserializeAlignedBytesLengthAtCursor: (unsigned int*) cursor Description forthcoming.
- (void) deserializeBytes: (void*) buffer length: (unsigned int) bytes atCursor: (unsigned int*) cursor Description forthcoming.
- (void) deserializeDataAt: (void*) data ofObjCType: (const char*) type atCursor: (unsigned int*) cursor context: (id<NSObjCTypeSerializationCallBack>) callback Description forthcoming.
- (int) deserializeIntAtCursor: (unsigned int*) cursor Description forthcoming.
- (int) deserializeIntAtIndex: (unsigned int) index Description forthcoming.
- (void) deserializeInts: (int*) intBuffer count: (unsigned int) numInts atCursor: (unsigned int*) cursor Description forthcoming.
- (void) deserializeInts: (int*) intBuffer count: (unsigned int) numInts atIndex: (unsigned int) index Description forthcoming.
- (void) getBytes: (void*) buffer Copies the contents of the memory encapsulated by
the receiver into the specified buffer. The
buffer must be large enough to contain
-length
bytes of data... if it isn't then a crash is likely
to occur.
Invokes
-getBytes:range:
with the range set to the whole of the receiver.
- (void) getBytes: (void*) buffer length: (unsigned int) length Copies length bytes of data from the
memory encapsulated by the receiver into the
specified buffer. The
buffer must be large enough to contain
length bytes of data... if it isn't then a
crash is likely to occur.
Invokes
-getBytes:range:
with the range set to iNSMakeRange(0,
length)
- (void) getBytes: (void*) buffer range: (NSRange) aRange Copies data from the memory encapsulated by the
receiver (in the range specified by
aRange) into the specified
buffer.
The buffer must
be large enough to contain the data... if it isn't then
a crash is likely to occur.
If aRange
specifies a range which does not entirely lie
within the receiver, an exception is raised.
- (id) initWithBytes: (const void*) aBuffer length: (unsigned int) bufferSize Makes a copy of bufferSize bytes of data
at aBuffer, and passes it to
-initWithBytesNoCopy:length:freeWhenDone: with a YES argument in order to initialise the receiver. Returns the result.
- (id) initWithBytesNoCopy: (void*) aBuffer length: (unsigned int) bufferSize Invokes
-initWithBytesNoCopy:length:freeWhenDone: with the last argument set to YES. Returns the resulting initialised data object (which may not be the receiver).
- (id) initWithBytesNoCopy: (void*) aBuffer length: (unsigned int) bufferSize freeWhenDone: (BOOL) shouldFree Initialises the receiver.
The value of
aBuffer is a pointer to something to be
stored.
The value of bufferSize
is the number of bytes to use.
The value fo
shouldFree specifies whether the receiver
should attempt to free the memory pointer to by
aBuffer when the receiver is deallocated
... ie. it says whether the receiver owns the
memory. Supplying the wrong value here will lead to
memory leaks or crashes.
- (id) initWithContentsOfFile: (NSString*) path Initialises the receiver with the contents of
the specified file.
Returns the resulting
object.
Returns nil if the file
does not exist or can not be read for some reason.
- (id) initWithContentsOfMappedFile: (NSString*) path Description forthcoming.
- (id) initWithContentsOfURL: (NSURL*) url Description forthcoming.
- (id) initWithData: (NSData*) data Description forthcoming.
- (BOOL) isEqualToData: (NSData*) other Returns a boolean value indicating if the receiver
and other contain identical data (using a
byte by byte comparison). Assumes that the
other object is an NSData instance... may
raise an exception if it isn't.
- (unsigned int) length Returns the number of bytes of data encapsulated by
the receiver.
- (NSData*) subdataWithRange: (NSRange) aRange Returns an NSData instance encapsulating the memory
from the reciever specified by the range
aRange.
If aRange
specifies a range which does not entirely lie
within the receiver, an exception is raised.
- (BOOL) writeToFile: (NSString*) path atomically: (BOOL) useAuxiliaryFile Writes a copy of the data encapsulated by the
receiver to a file at path. If the
useAuxiliaryFile flag is
YES, this writes to a temporary file
and then renames that to the file at path,
thus ensuring that path exists and does
not contain partially written data at any point.
On success returns YES, on failure
returns NO.
- (BOOL) writeToURL: (NSURL*) anURL atomically: (BOOL) flag Writes a copy of the contents of the receiver to the
specified URL.
Inherits From: NSURLHandle: NSObject Declared in: NSURLHandle.h
An NSURLHandle instance is used to manage the resource
data corresponding to an NSURL object. A single
NSURLHandle can be used to manage multiple
NSURL objects as long as those objects all refer to
the same resource.
Different NSURLHandle subclasses are used to
manage different types of URL (usually based on the
scheme of the URL), and you can register new
subclasses to extend (or replace) the standard
ones.
GNUstep comes with private subclasses to handle the
common URL schemes -
+ (Class) URLHandleClassForURL: (NSURL*) url Returns the most recently registered NSURLHandle
subclass that responds to
+canInitWithURL:
with YES. If there is no such subclass,
returns nil.
+ (NSURLHandle*) cachedHandleForURL: (NSURL*) url Return a handle for the specified URL from the cache
if possible. If the cache does not contain a matching
handle, returns nil.
+ (BOOL) canInitWithURL: (NSURL*) url Implemented by subclasses to say which URLs
they can handle. This method is used to determine
which subclasses can be used to handle a particular
URL.
+ (void) registerURLHandleClass: (Class) urlHandleSubclass Used to register a subclass as being available to
handle URLs.
- (void) addClient: (id<NSURLHandleClient>) client Add a client object, making sure that it
doesn't occur more than once.
The
client object will receive messages
notifying it of events on the handle.
- (NSData*) availableResourceData Returns the resource data that is currently
available for the handle. This may be a partially
loaded resource or may be empty of no data has been
loaded yet.
- (void) backgroundLoadDidFailWithReason: (NSString*) reason This method should be called when a background load
fails.
The method passes the failure
notification to the clients of the handle - so
subclasses should call super's implementation at
the end of their implementation of this method.
- (void) beginLoadInBackground This method is called by when a background load
begins. Subclasses should call super's
implementation at the end of their
implementation of this method.
- (void) cancelLoadInBackground This method should be called to cancel a load
currently in progress. The method calls
-endLoadInBackground
Subclasses should call super's implementation at
the end of their implementation of this method.
- (void) didLoadBytes: (NSData*) newData loadComplete: (BOOL) loadComplete Method called by subclasses during process of
loading a resource. The base class maintains a copy
of the data being read in and accumulates separate parts
of the data.
- (void) endLoadInBackground This method is called to stop any background loading
process.
-cancelLoadInBackground
uses this method to cancel loading. Subclasses should
call super's implementation at the end of their
implementation of this method.
- (NSString*) failureReason Returns the failure reason for the last failure to
load the resource data.
- (void) flushCachedData Flushes any cached resource data.
- (id) initWithURL: (NSURL*) url cached: (BOOL) cached Initialises a handle with the specified URL.
The flag determines whether the handle will
cache resource data and respond to requests from
equivalent URLs for the cached data.
- (void) loadInBackground Starts (or queues) loading of the handle's resource
data in the background (asynchronously).
The
default implementation uses loadInForeground - if
this method is not overridden, loadInForeground MUST
be.
- (NSData*) loadInForeground Loads the handle's resource data in the foreground
(synchronously).
The default
implementation starts a background load and
waits for it to complete - if this method is not
overridden, loadInBackground MUST be.
- (id) propertyForKey: (NSString*) propertyKey Returns the property for the specified key, or
nil if the key does not exist.
- (id) propertyForKeyIfAvailable: (NSString*) propertyKey Returns the property for the specified key, but
only if the handle does not need to do any work to
retrieve it.
- (void) removeClient: (id<NSURLHandleClient>) client Removes an object from them list of clients
notified of resource loading events by the URL
handle.
- (NSData*) resourceData Returns the resource data belonging to the handle.
Calls
-loadInForeground
if necessary.
The GNUstep implementation treats an ftp:
request for a directory as a request to list the
names of the directory contents.
- (NSURLHandleStatus) status Returns the current status of the handle.
- (BOOL) writeData: (NSData*) data Writes resource data to the handle.
Returns YES on success,
NO on failure.
The GNUstep implementation for file: writes
the data directly to the local filesystem,
and the return status reflects the result of that
write operation.
The GNUstep implementation for http: and
https: sets the specified data
as information to be POSTed to the URL next time it is
loaded - so the method always returns
YES.
The GNUstep implementation for ftp: sets the
specified data as information to be
weitten to the URL next time it is loaded - so
the method always returns YES.
- (BOOL) writeProperty: (id) propertyValue forKey: (NSString*) propertyKey Sets a property for handle. Returns YES
on success, NO on failure.
The GNUstep implementation sets the property as a
header to be sent the next time the URL is loaded,
and recognizes some special property keys which
control the behavior of the next load.
Inherits From: GSFFIInvocation: NSInvocation: NSObject Declared in: GSInvocation.h
Description forthcoming.Inherits From: NSNotification: NSObject Conforms to: NSCopyingNSCoding
Declared in: NSNotification.h
Description forthcoming.
+ (NSNotification*) notificationWithName: (NSString*) name object: (id) object Create a new autoreleased notification by calling
+notificationWithName:object:userInfo: with a nil user info argument.
+ (NSNotification*) notificationWithName: (NSString*) name object: (id) object userInfo: (NSDictionary*) info Create a new autoreleased notification. Concrete
subclasses override this method to create actual
notification objects.
- (NSString*) name Concrete subclasses of NSNotification are
responsible for implementing this method to
return the notification name.
- (id) object Concrete subclasses of NSNotification are
responsible for implementing this method to
return the notification object.
- (NSDictionary*) userInfo Concrete subclasses of NSNotification are
responsible for implementing this method to
return the notification user information.
Inherits From: NSUIntNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSUShortNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSDistributedNotificationCenter: NSNotificationCenter: NSObject Declared in: NSDistributedNotificationCenter.h
The NSDistributedNotificationCenter provides a
versatile yet simple mechanism for objects in
different processes to communicate effectively
while knowing very little about each others
internals.
A distributed notification
center acts much like a normal notification center,
but it handles notifications on a machine-wide (or
local network wide) basis rather than just
notifications within a single process.
Objects are able to register themselves as
observers for particular notification names and
objects, and they will then receive notifications
(including optional user information consisting
of a dictionary of property-list objects) as they are
posted.
Since posting of distributed notifications involves
inter-process (and sometimes inter-host)
communication, it is fundamentally slower
than normal notifications, and should be used
relatively sparingly. In order to help with
this, the NSDistributedNotificationCenter provides a
notion of 'suspension', whereby a center can be
suspended causing notifications for observers in
the process where the center was suspended to cease
receiving notifications. Observers can specify
how notifications are to be handled in this case
(queued or discarded) and posters can specify that
particular notifications are to be delivered
immediately irrespective of suspension.
Distributed notifications are mediated by a
server process which handles all notifications for a
particular center type. In GNUstep this process
is the gdnc tool, and when started without special
options, a gdnc process acts as the local centre
for the host it is running on. When started with the
GSNetwork user default set to YES,
the gdnc tool acts as a local network wide server (you
should only run one copy of gdnc like this on your
LAN).
The gdnc process should be started at
machine boot time, but GNUstep will attempt to
start it automatically if it can't find it.
MacOS-X currently defines only a notification
center for the local host. GNUstep also defines a
local network center which can be used from multiple
hosts. By default the system sends this to any gdnc
process it can find which is configured as a
network-wide server, but the GDNCHost user
default may be used to specify a particular host to
be contacted... this may be of use where you wish to
have logically separate clusters of machines on a
shared LAN.
+ (NSNotificationCenter*) defaultCenter Returns the default notification center... a shared
notification center for the local host. This
is simply a convenience method equivalent to calling
+notificationCenterForType:
with NSLocalNotificationCenterType as its argument.
+ (NSNotificationCenter*) notificationCenterForType: (NSString*) type Returns a notification center of the specified
type.
The
NSLocalNotificationCenterType
provides a shared access to a notificatiuon center
used by processes on the local host.
The
GSNetworkNotificationCenterType
provides a shared access to a notificatiuon center
used by processes on the local network.
MacOS-X
supports only NSLocalNotificationCenterType.
- (void) addObserver: (id) anObserver selector: (SEL) aSelector name: (NSString*) notificationName object: (NSString*) anObject Adds an observer to the receiver. Calls
-addObserver:selector:name:object:suspensionBehavior: with NSNotificationSuspensionBehaviorCoalesce.
- (void) addObserver: (id) anObserver selector: (SEL) aSelector name: (NSString*) notificationName object: (NSString*) anObject suspensionBehavior: (NSNotificationSuspensionBehavior) suspensionBehavior Adds an observer to the receiver.
When a
notification matching
notificationName and anObject
is sent to the center, the object anObserver
is sent the message aSelector with the
notification info dictionary as its argument.
The suspensionBehavior governs how
the center deals with notifications when the process to
which the notification should be delivered is
suspended:
- (void) postNotification: (NSNotification*) notification Posts the notification to the center using
postNotificationName:object:userInfo:deliverImmediately:
with the delivery flag set to NO.
- (void) postNotificationName: (NSString*) notificationName object: (NSString*) anObject Posts the notificationName and
anObject to the center using
postNotificationName:object:userInfo:deliverImmediately:
with the user info set to nil and the
delivery flag set to NO.
- (void) postNotificationName: (NSString*) notificationName object: (NSString*) anObject userInfo: (NSDictionary*) userInfo Posts the notificationName,
anObject and userInfo to the
center using
postNotificationName:object:userInfo:deliverImmediately:
with the delivery flag set to NO.
- (void) postNotificationName: (NSString*) notificationName object: (NSString*) anObject userInfo: (NSDictionary*) userInfo deliverImmediately: (BOOL) deliverImmediately The primitive notification posting method...
The
userInfo dictionary may contain only
property-list objects.
The
deliverImmediately flag specifies whether
the suspension state of the receiving process is to be
ignored.
- (void) removeObserver: (id) anObserver name: (NSString*) notificationName object: (NSString*) anObject Removes the observer from the center.
- (void) setSuspended: (BOOL) flag Sets the suspension state of the receiver... if the
receiver is suspended, it won't handle
notification until it is unsuspended again,
unless the notifications are posted to be delivered
immediately.
- (BOOL) suspended Returns the current suspension state of the
receiver.
Inherits From: NSNotificationQueue: NSObject Declared in: NSNotificationQueue.h
Description forthcoming.
+ (NSNotificationQueue*) defaultQueue Description forthcoming.
- (void) dequeueNotificationsMatching: (NSNotification*) notification coalesceMask: (unsigned int) coalesceMask Description forthcoming.
- (void) enqueueNotification: (NSNotification*) notification postingStyle: (NSPostingStyle) postingStyle Description forthcoming.
- (void) enqueueNotification: (NSNotification*) notification postingStyle: (NSPostingStyle) postingStyle coalesceMask: (unsigned int) coalesceMask forModes: (NSArray*) modes Description forthcoming.
- (id) initWithNotificationCenter: (NSNotificationCenter*) notificationCenter Description forthcoming.Inherits From: GCArray: NSArray: NSObject Declared in: GCObject.h
Description forthcoming.Inherits From: GCMutableDictionary: NSMutableDictionary: NSDictionary: NSObject Declared in: GCObject.h
Description forthcoming.Inherits From: GSMimeCodingContext: NSObject Declared in: GSMime.h
Description forthcoming.
- (BOOL) atEnd Description forthcoming.
- (BOOL) decodeData: (const void*) sData length: (unsigned) length intoData: (NSMutableData*) dData Description forthcoming.
- (void) setAtEnd: (BOOL) flag Description forthcoming.Inherits From: GSXPathString: GSXPathObject: NSObject Declared in: GSXML.h
For XPath queries returning a string.
- (NSString*) stringValue Description forthcoming.Inherits From: NSDate: NSObject Conforms to: NSCodingNSCopying
Declared in: NSDate.h
Description forthcoming.
+ (id) date Description forthcoming.
+ (id) dateWithNaturalLanguageString: (NSString*) string Description forthcoming.
+ (id) dateWithNaturalLanguageString: (NSString*) string locale: (NSDictionary*) locale Description forthcoming.
+ (id) dateWithString: (NSString*) description Description forthcoming.
+ (id) dateWithTimeIntervalSince1970: (NSTimeInterval) seconds Description forthcoming.
+ (id) dateWithTimeIntervalSinceNow: (NSTimeInterval) seconds Description forthcoming.
+ (id) dateWithTimeIntervalSinceReferenceDate: (NSTimeInterval) seconds Description forthcoming.
+ (id) distantFuture Description forthcoming.
+ (id) distantPast Description forthcoming.
+ (NSTimeInterval) timeIntervalSinceReferenceDate Description forthcoming.
- (id) addTimeInterval: (NSTimeInterval) seconds Description forthcoming.
- (NSComparisonResult) compare: (NSDate*) otherDate Description forthcoming.
- (NSCalendarDate*) dateWithCalendarFormat: (NSString*) formatString timeZone: (NSTimeZone*) timeZone Description forthcoming.
- (NSString*) description Description forthcoming.
- (NSString*) descriptionWithCalendarFormat: (NSString*) format timeZone: (NSTimeZone*) aTimeZone locale: (NSDictionary*) l Description forthcoming.
- (NSString*) descriptionWithLocale: (NSDictionary*) locale Description forthcoming.
- (NSDate*) earlierDate: (NSDate*) otherDate Description forthcoming.
- (id) initWithString: (NSString*) description Description forthcoming.
- (id) initWithTimeInterval: (NSTimeInterval) secsToBeAdded sinceDate: (NSDate*) anotherDate Description forthcoming.
- (id) initWithTimeIntervalSince1970: (NSTimeInterval) seconds Description forthcoming.
- (id) initWithTimeIntervalSinceNow: (NSTimeInterval) secsToBeAdded Description forthcoming.
- (id) initWithTimeIntervalSinceReferenceDate: (NSTimeInterval) secs Description forthcoming.
- (BOOL) isEqualToDate: (NSDate*) other Description forthcoming.
- (NSDate*) laterDate: (NSDate*) otherDate Description forthcoming.
- (NSTimeInterval) timeIntervalSince1970 Description forthcoming.
- (NSTimeInterval) timeIntervalSinceDate: (NSDate*) otherDate Description forthcoming.
- (NSTimeInterval) timeIntervalSinceNow Description forthcoming.
- (NSTimeInterval) timeIntervalSinceReferenceDate Description forthcoming.Inherits From: GSXMLNamespace: NSObject Conforms to: NSCopying
Declared in: GSXML.h
Description forthcoming.
+ (NSString*) descriptionFromType: (int) type Description forthcoming.
+ (int) typeFromDescription: (NSString*) desc Description forthcoming.
- (NSString*) href Description forthcoming.
- (void*) lib Description forthcoming.
- (GSXMLNamespace*) next Description forthcoming.
- (NSString*) prefix Description forthcoming.
- (int) type Description forthcoming.
- (NSString*) typeDescription Description forthcoming.Inherits From: NSSerializer: NSObject Declared in: NSSerialization.h
Description forthcoming.
+ (NSData*) serializePropertyList: (id) propertyList Description forthcoming.
+ (void) serializePropertyList: (id) propertyList intoData: (NSMutableData*) d Description forthcoming.Inherits From: GSMimeDocument: NSObject Declared in: GSMime.h
Description forthcoming.
+ (NSString*) charsetFromEncoding: (NSStringEncoding) enc Description forthcoming.
+ (NSData*) decodeBase64: (NSData*) source Description forthcoming.
+ (NSString*) decodeBase64String: (NSString*) source Description forthcoming.
+ (GSMimeDocument*) documentWithContent: (id) newContent type: (NSString*) type name: (NSString*) name Description forthcoming.
+ (NSData*) encodeBase64: (NSData*) source Description forthcoming.
+ (NSString*) encodeBase64String: (NSString*) source Description forthcoming.
+ (NSStringEncoding) encodingFromCharset: (NSString*) charset Description forthcoming.
- (void) addContent: (id) newContent Description forthcoming.
- (void) addHeader: (GSMimeHeader*) info Description forthcoming.
- (NSArray*) allHeaders Description forthcoming.
- (id) content Description forthcoming.
- (id) contentByID: (NSString*) key Description forthcoming.
- (id) contentByName: (NSString*) key Description forthcoming.
- (NSString*) contentFile Description forthcoming.
- (NSString*) contentID Description forthcoming.
- (NSString*) contentName Description forthcoming.
- (NSString*) contentSubtype Description forthcoming.
- (NSString*) contentType Description forthcoming.
- (NSArray*) contentsByName: (NSString*) key Description forthcoming.
- (NSData*) convertToData Description forthcoming.
- (NSString*) convertToText Description forthcoming.
- (void) deleteHeader: (GSMimeHeader*) aHeader Description forthcoming.
- (void) deleteHeaderNamed: (NSString*) name Description forthcoming.
- (GSMimeHeader*) headerNamed: (NSString*) name Description forthcoming.
- (NSArray*) headersNamed: (NSString*) name Description forthcoming.
- (NSString*) makeBoundary Description forthcoming.
- (GSMimeHeader*) makeContentID Description forthcoming.
- (GSMimeHeader*) makeMessageID Description forthcoming.
- (NSMutableData*) rawMimeData Description forthcoming.
- (NSMutableData*) rawMimeData: (BOOL) isOuter Description forthcoming.
- (void) setContent: (id) newContent Description forthcoming.
- (void) setContent: (id) newContent type: (NSString*) type Description forthcoming.
- (void) setContent: (id) newContent type: (NSString*) type name: (NSString*) name Description forthcoming.
- (void) setHeader: (GSMimeHeader*) info Description forthcoming.Inherits From: NXConstantString: NSString: NSObject Declared in: NSString.h
The NXConstantString class is used to hold constant
8-bit character string objects produced by the
compiler where it sees @"..." in the source. The
compiler generates the instances of this class -
which has three instance variables -
In older versions of the compiler, the isa variable is
always set to the NXConstantString class. In newer
versions a compiler option was added for GNUstep,
to permit the isa variable to be set to another class,
and GNUstep uses this to avoid conflicts with the
default implementation of NXConstantString in the
ObjC runtime library (the preprocessor is used to
change all occurances of NXConstantString in the
source code to NSConstantString).
Since GNUstep will generally use the GNUstep
extension to the compiler, you should never refer
to the constnat string class by name, but should use the
[NSString% unknown entity: nbsp
+constantStringClass] method to get the actual class being used for constant strings.
What follows is a dummy declaration of the class to keep
the compiler happy.
Inherits From: NSEnumerator: NSObject Declared in: NSEnumerator.h
Description forthcoming.
- (NSArray*) allObjects Description forthcoming.
- (id) nextObject Description forthcoming.Inherits From: GSMimeHeader: NSObject Declared in: GSMime.h
Description forthcoming.
+ (NSString*) makeQuoted: (NSString*) v always: (BOOL) flag Description forthcoming.
+ (NSString*) makeToken: (NSString*) t Description forthcoming.
- (id) initWithName: (NSString*) n value: (NSString*) v Description forthcoming.
- (id) initWithName: (NSString*) n value: (NSString*) v parameters: (NSDictionary*) p Description forthcoming.
- (NSString*) name Description forthcoming.
- (id) objectForKey: (NSString*) k Description forthcoming.
- (NSDictionary*) objects Description forthcoming.
- (NSString*) parameterForKey: (NSString*) k Description forthcoming.
- (NSDictionary*) parameters Description forthcoming.
- (NSMutableData*) rawMimeData Description forthcoming.
- (void) setName: (NSString*) s Description forthcoming.
- (void) setObject: (id) o forKey: (NSString*) k Description forthcoming.
- (void) setParameter: (NSString*) v forKey: (NSString*) k Description forthcoming.
- (void) setParameters: (NSDictionary*) d Description forthcoming.
- (void) setValue: (NSString*) s Description forthcoming.
- (NSString*) text Description forthcoming.
- (NSString*) value Description forthcoming.Inherits From: GSXPathNodeSet: GSXPathObject: NSObject Declared in: GSXML.h
For XPath queries returning a node set.
- (unsigned int) count Description forthcoming.
- (unsigned int) length Description forthcoming.
- (GSXMLNode*) nodeAtIndex: (unsigned) index Please note that index starts from 0.
Inherits From: NSUnarchiver: NSCoder: NSObject Declared in: NSArchiver.h
This class reconstructs objects from an archive.
Re-using the archiver
The
-resetUnarchiverWithData:atIndex:
method lets you re-use the archive to decode a new
data object or, in conjunction with the 'cursor'
method (which reports the current decoding position
in the archive), decode a second archive that exists in
the data object after the first one.
Subclassing with different input format.
NSUnarchiver normally reads directly from an
NSData object using the methods -
And uses other NSData methods to read the archive
header information from within the method:
[-deserializeHeaderAt:version:classes:objects:pointers:] to read a fixed size header including archiver version (obtained by [self systemVersion]) and crossreference table sizes.
To subclass NSUnarchiver, you must implement your own
versions of the four methods above, and override
the 'directDataAccess' method to return NO
so that the archiver knows to use your serialization
methods rather than those in the NSData object.
+ (NSString*) classNameDecodedForArchiveClassName: (NSString*) nameInArchive Description forthcoming.
+ (void) decodeClassName: (NSString*) nameInArchive asClassName: (NSString*) trueName Description forthcoming.
+ (id) unarchiveObjectWithData: (NSData*) anObject Description forthcoming.
+ (id) unarchiveObjectWithFile: (NSString*) path Description forthcoming.
- (NSString*) classNameDecodedForArchiveClassName: (NSString*) nameInArchive Description forthcoming.
- (void) decodeClassName: (NSString*) nameInArchive asClassName: (NSString*) trueName Description forthcoming.
- (id) initForReadingWithData: (NSData*) anObject Description forthcoming.
- (BOOL) isAtEnd Description forthcoming.
- (NSZone*) objectZone Description forthcoming.
- (void) replaceObject: (id) anObject withObject: (id) replacement Description forthcoming.
- (void) setObjectZone: (NSZone*) aZone Description forthcoming.
- (unsigned int) systemVersion Description forthcoming.Inherits From: NSDeserializer: NSObject Declared in: NSSerialization.h
Description forthcoming.
+ (id) deserializePropertyListFromData: (NSData*) data atCursor: (unsigned int*) cursor mutableContainers: (BOOL) flag Description forthcoming.
+ (id) deserializePropertyListFromData: (NSData*) data mutableContainers: (BOOL) flag Description forthcoming.
+ (id) deserializePropertyListLazilyFromData: (NSData*) data atCursor: (unsigned*) cursor length: (unsigned) length mutableContainers: (BOOL) flag Description forthcoming.Inherits From: NSTimer: NSObject Declared in: NSTimer.h
Description forthcoming.
+ (NSTimer*) scheduledTimerWithTimeInterval: (NSTimeInterval) ti invocation: (NSInvocation*) invocation repeats: (BOOL) f Create a timer which will fire after ti
seconds and, if f is YES,
every ti seconds thereafter. On firing,
invocation will be performed.
This
timer will automatically be added to the current run
loop and will fire in the default run loop mode.
+ (NSTimer*) scheduledTimerWithTimeInterval: (NSTimeInterval) ti target: (id) object selector: (SEL) selector userInfo: (id) info repeats: (BOOL) f Create a timer which will fire after ti
seconds and, if f is YES,
every ti seconds thereafter. On firing,
the target object will be sent a message
specified by selector and with the
objectinfo as an argument.
This timer will automatically be added to the
current run loop and will fire in the default run
loop mode.
+ (NSTimer*) timerWithTimeInterval: (NSTimeInterval) ti invocation: (NSInvocation*) invocation repeats: (BOOL) f Create a timer wchich will fire after ti
seconds and, if f is YES,
every ti seconds thereafter. On firing,
invocation will be performed.
NB.
To make the timer operate, you must add it to a run
loop.
+ (NSTimer*) timerWithTimeInterval: (NSTimeInterval) ti target: (id) object selector: (SEL) selector userInfo: (id) info repeats: (BOOL) f Create a timer wchich will fire after ti
seconds and, if f is YES,
every ti seconds thereafter. On firing,
the target object will be sent a message
specified by selector and with the
objectinfo as an argument.
NB. To make the timer operate, you must add
it to a run loop.
- (void) fire Fires the timer... either performs an invocation or
ssends a message to a target object, depending on
how the timer was set up.
If the timer is not
set to repeat, it is automatically invalidated.
- (NSDate*) fireDate Returns the date/time at which the timer is next
due to fire.
- (id) initWithFireDate: (NSDate*) fd interval: (NSTimeInterval) ti target: (id) object selector: (SEL) selector userInfo: (id) info repeats: (BOOL) f Initialise the receive, a newly allocated
NSTimer object.
The fd
argument specifies an initial fire date... if it
is not supplied (a nilobject)
then the ti argument is used to create a
start date relative to the current time.
The
ti argument specifies the time (in
seconds) between the firing. If it is less than or
equal to 0.0 then a small interval is chosen
automatically.
The f
argument specifies whether the timer will fire
repeatedly or just once.
If the
selector argument is zero, then then
object is an invocation to be used when
the timer fires. otherwise, the object is
sent the message specified by the selector
and with the timer as an argument.
The
fd, object and info
arguments will be retained until the timer is
invalidated.
- (void) invalidate Marks the timer as invalid, causing its
target/invocation and user info objects
to be released.
Invalidated timers are
automatically removed from the run loop when
it detects them.
- (BOOL) isValid Checks to see if the timer has been invalidated.
- (void) setFireDate: (NSDate*) fireDate Change the fire date for the receiver.
NB.
You should NOT use this method for a timer
which has been added to a run loop. The only time
when it is safe to modify the fire date of a timer in
a run loop is for a repeating timer when the timer is
actually in the process of firing.
- (NSTimeInterval) timeInterval Returns the interval beteen firings.
- (id) userInfo Returns the user info which was set for the timer
when it was created, or nil if none was
set or the timer is invalid.
Inherits From: GSFFCallInvocation: NSInvocation: NSObject Declared in: GSInvocation.h
Description forthcoming.Inherits From: NSFloatNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSDistributedLock: NSObject Declared in: NSDistributedLock.h
Description forthcoming.
+ (NSDistributedLock*) lockWithPath: (NSString*) aPath Return a distributed lock for aPath. See
-initWithPath:
for details.
- (void) breakLock Forces release of the lock whether the receiver owns
it or not.
Raises an NSGenericException if unable
to remove the lock.
- (NSDistributedLock*) initWithPath: (NSString*) aPath Initialises the reciever with the specified
filesystem path.
The location in the
filesystem must be accessible for this to be
usable. That is, the processes using the lock must
be able to access, create, and destroy files at the
path.
The directory in which the last path
component resides must already exist... create it
using NSFileManager if you need to.
- (NSDate*) lockDate Returns the date at which the lock was aquired by
any NSDistributedLock using the same path. If nothing
has the lock, this returns nil.
- (BOOL) tryLock Attempt to aquire the lock and return
YES on success, NO on
failure.
May raise an NSGenericException if
a problem occurs.
- (void) unlock Releases the lock. Raises an NSGenericException if
unable to release the lock (for instance if the
receiver does not own it or another process has
broken it).
Inherits From: NSDictionary: NSObject Conforms to: NSCodingNSCopyingNSMutableCopying
Declared in: NSDictionary.h
Description forthcoming.
+ (id) dictionary Description forthcoming.
+ (id) dictionaryWithContentsOfFile: (NSString*) path Returns a dictionary using the file located at
path. The file must be a property list
containing a dictionary as its root object.
+ (id) dictionaryWithDictionary: (NSDictionary*) otherDictionary Returns a newly created dictionary with the keys
and objects of otherDictionary. (The keys
and objects are not copied.)
+ (id) dictionaryWithObject: (id) object forKey: (id) key Returns a dictionary containing only one
object which is associated with a
key.
+ (id) dictionaryWithObjects: (NSArray*) objects forKeys: (NSArray*) keys Description forthcoming.
+ (id) dictionaryWithObjects: (id*) objects forKeys: (id*) keys count: (unsigned) count Returns a dictionary created using the given
objects and keys. The two
arrays must have the same size. The n th element of
the objects array is associated with the n
th element of the keys array.
+ (id) dictionaryWithObjectsAndKeys: (id) firstObject Returns a dictionary created using the list given
as argument. The list is alernately composed of objects
and keys. Thus, the list's length must be pair.
- (NSArray*) allKeys Returns an array containing all the dictionary's
keys.
- (NSArray*) allKeysForObject: (id) anObject Returns an array containing all the dictionary's
keys that are associated with anObject.
- (NSArray*) allValues Returns an array containing all the dictionary's
objects.
- (unsigned) count Returns an unsigned integer which is the number of
elements stored in the dictionary.
- (NSString*) description Returns the result of invoking
-descriptionWithLocale:indent:
with a nil locale and zero indent.
- (NSString*) descriptionInStringsFileFormat Returns the receiver as a text property list
strings file format.
See
[NSString% unknown entity: nbsp
-propertyListFromStringsFileFormat] for details.
The order of the items is undefined.
- (NSString*) descriptionWithLocale: (NSDictionary*) locale Returns the result of invoking
-descriptionWithLocale:indent:
with a zero indent.
- (NSString*) descriptionWithLocale: (NSDictionary*) locale indent: (unsigned int) level Returns the receiver as a text property list in the
traditional format.
See
[NSString% unknown entity: nbsp
-propertyList]
for details.
If locale is
nil, no formatting is done, otherwise
entries are formatted according to the
locale, and indented according to
level.
Unless locale is
nil, a level of zero indents
items by four spaces, while a level of one
indents them by a tab.
If the keys in the
dictionary respond to
-compare:
, the items are listed by key in ascending order. If not,
the order in which the items are listed is undefined.
- (id) initWithContentsOfFile: (NSString*) path Initialises the dictionary with the contents
of the specified file, which must contain a dictionary
in property-list format.
In GNUstep, the property-list format may be either the
OpenStep format (ASCII data), or the MacOS-X
format (URF8 XML data)... this method will
recognise which it is.
If there is a failure to load the file for any reason,
the receiver will be released and the method will
return nil.
Works by invoking
[NSString% unknown entity: nbsp
-initWithContentsOfFile:] and [NSString% unknown entity: nbsp
-propertyList] then checking that the result is a dictionary.
- (id) initWithDictionary: (NSDictionary*) otherDictionary Description forthcoming.
- (id) initWithDictionary: (NSDictionary*) other copyItems: (BOOL) shouldCopy Initialise dictionary with the keys and values
of otherDictionary. If the shouldCopy flag is
YES then the values are copied into the
newly initialised dictionary, otherwise they are
simply retained.
- (id) initWithObjects: (NSArray*) objects forKeys: (NSArray*) keys Initialises a dictionary created using the
given objects and keys. The two
arrays must have the same size. The n th element of
the objects array is associated with the n
th element of the keys array.
- (id) initWithObjects: (id*) objects forKeys: (id*) keys count: (unsigned) count Description forthcoming.
- (id) initWithObjectsAndKeys: (id) firstObject Initialises a dictionary created using the list
given as argument. The list is alernately composed of
objects and keys. Thus, the list's length must be
pair.
- (BOOL) isEqualToDictionary: (NSDictionary*) other Description forthcoming.
- (NSEnumerator*) keyEnumerator Return an enumerator object containing all the keys
of the dictionary.
- (NSArray*) keysSortedByValueUsingSelector: (SEL) comp Description forthcoming.
- (NSEnumerator*) objectEnumerator Return an enumerator object containing all the
objects of the dictionary.
- (id) objectForKey: (id) aKey Returns the object in the dictionary corresponding
to aKey, or nil if the key is
not present.
- (NSArray*) objectsForKeys: (NSArray*) keys notFoundMarker: (id) marker Description forthcoming.
- (id) valueForKey: (NSString*) key Default implementation for this class is to return
the value stored in the dictionary under the specified
key, or nil if there is no
value.
- (BOOL) writeToFile: (NSString*) path atomically: (BOOL) useAuxiliaryFile Writes the contents of the dictionary to the file
specified by path. The file contents
will be in property-list format... under GNUstep
this is either OpenStep style (ASCII characters
using \U hexadecimal escape sequences for unicode),
or MacOS-X style (XML in the UTF8 character set).
If the useAuxiliaryFile flag is
YES, the file write operation is
atomic... the data is written to a temporary file,
which is then renamed to the actual file name.
If the conversion of data into the correct
property-list format fails or the write
operation fails, the method returns
NO, otherwise it returns
YES.
NB. The fact that the file is in property-list format
does not necessarily mean that it can be used to
reconstruct the dictionary using the
-initWithContentsOfFile:
method. If the original dictionary contains
non-property-list objects, the
descriptions of those objects will have been
written, and reading in the file as a
property-list will result in a new
dictionary containing the string descriptions.
- (BOOL) writeToURL: (NSURL*) url atomically: (BOOL) useAuxiliaryFile Writes the contents of the dictionary to the
specified url. This functions just
like
-writeToFile:atomically:
except that the output may be written to any URL,
not just a local file.
Inherits From: NSMutableAttributedString: NSAttributedString: NSObject Declared in: NSAttributedString.h
Description forthcoming.
- (void) addAttribute: (NSString*) name value: (id) value range: (NSRange) aRange Description forthcoming.
- (void) addAttributes: (NSDictionary*) attributes range: (NSRange) aRange Description forthcoming.
- (void) appendAttributedString: (NSAttributedString*) attributedString Description forthcoming.
- (void) beginEditing Description forthcoming.
- (void) deleteCharactersInRange: (NSRange) aRange Description forthcoming.
- (void) endEditing Description forthcoming.
- (void) insertAttributedString: (NSAttributedString*) attributedString atIndex: (unsigned int) index Description forthcoming.
- (NSMutableString*) mutableString Description forthcoming.
- (void) removeAttribute: (NSString*) name range: (NSRange) aRange Description forthcoming.
- (void) replaceCharactersInRange: (NSRange) aRange withAttributedString: (NSAttributedString*) attributedString Description forthcoming.
- (void) replaceCharactersInRange: (NSRange) aRange withString: (NSString*) aString Description forthcoming.
- (void) setAttributedString: (NSAttributedString*) attributedString Description forthcoming.
- (void) setAttributes: (NSDictionary*) attributes range: (NSRange) aRange Description forthcoming.Inherits From: NSNumberFormatter: NSFormatter: NSObject Declared in: NSNumberFormatter.h
Description forthcoming.
- (BOOL) allowsFloats Description forthcoming.
- (NSAttributedString*) attributedStringForNil Description forthcoming.
- (NSAttributedString*) attributedStringForNotANumber Description forthcoming.
- (NSAttributedString*) attributedStringForZero Description forthcoming.
- (NSString*) decimalSeparator Description forthcoming.
- (NSString*) format Description forthcoming.
- (BOOL) hasThousandSeparators Description forthcoming.
- (BOOL) localizesFormat Description forthcoming.
- (NSDecimalNumber*) maximum Description forthcoming.
- (NSDecimalNumber*) minimum Description forthcoming.
- (NSString*) negativeFormat Description forthcoming.
- (NSString*) positiveFormat Description forthcoming.
- (NSDecimalNumberHandler*) roundingBehavior Description forthcoming.
- (void) setAllowsFloats: (BOOL) flag Description forthcoming.
- (void) setAttributedStringForNil: (NSAttributedString*) newAttributedString Description forthcoming.
- (void) setAttributedStringForNotANumber: (NSAttributedString*) newAttributedString Description forthcoming.
- (void) setAttributedStringForZero: (NSAttributedString*) newAttributedString Description forthcoming.
- (void) setDecimalSeparator: (NSString*) newSeparator Description forthcoming.
- (void) setFormat: (NSString*) aFormat Description forthcoming.
- (void) setHasThousandSeparators: (BOOL) flag Description forthcoming.
- (void) setLocalizesFormat: (BOOL) flag Description forthcoming.
- (void) setMaximum: (NSDecimalNumber*) aMaximum Description forthcoming.
- (void) setMinimum: (NSDecimalNumber*) aMinimum Description forthcoming.
- (void) setNegativeFormat: (NSString*) aFormat Description forthcoming.
- (void) setPositiveFormat: (NSString*) aFormat Description forthcoming.
- (void) setRoundingBehavior: (NSDecimalNumberHandler*) newRoundingBehavior Description forthcoming.
- (void) setTextAttributesForNegativeValues: (NSDictionary*) newAttributes Description forthcoming.
- (void) setTextAttributesForPositiveValues: (NSDictionary*) newAttributes Description forthcoming.
- (void) setThousandSeparator: (NSString*) newSeparator Description forthcoming.
- (NSDictionary*) textAttributesForNegativeValues Description forthcoming.
- (NSDictionary*) textAttributesForPositiveValues Description forthcoming.
- (NSString*) thousandSeparator Description forthcoming.Inherits From: NSArchiver: NSCoder: NSObject Declared in: NSArchiver.h
Description forthcoming.
+ (BOOL) archiveRootObject: (id) rootObject toFile: (NSString*) path Description forthcoming.
+ (NSData*) archivedDataWithRootObject: (id) rootObject Description forthcoming.
- (NSMutableData*) archiverData Description forthcoming.
- (NSString*) classNameEncodedForTrueClassName: (NSString*) trueName Description forthcoming.
- (void) encodeClassName: (NSString*) trueName intoClassName: (NSString*) inArchiveName Description forthcoming.
- (id) initForWritingWithMutableData: (NSMutableData*) mdata Description forthcoming.
- (void) replaceObject: (id) object withObject: (id) newObject Description forthcoming.Inherits From: NSNotificationCenter: NSObject Conforms to: GCFinalization
Declared in: NSNotification.h
Description forthcoming.
+ (NSNotificationCenter*) defaultCenter Description forthcoming.
- (void) addObserver: (id) observer selector: (SEL) selector name: (NSString*) name object: (id) object Description forthcoming.
- (void) postNotification: (NSNotification*) notification Posts notification to all the observers
that match its NAME and OBJECT.
The GNUstep
implementation calls
-postNotificationName:object:userInfo: to perform the actual posting.
- (void) postNotificationName: (NSString*) name object: (id) object Creates and posts a notification using the
-postNotificationName:object:userInfo: passing a nil user info argument.
- (void) postNotificationName: (NSString*) name object: (id) object userInfo: (NSDictionary*) info The preferred method for posting a notification.
For performance reasons, we don't wrap an exception
handler round every message sent to an observer.
This means that, if one observer raises an exception,
later observers in the lists will not get the
notification.
- (void) removeObserver: (id) observer Description forthcoming.
- (void) removeObserver: (id) observer name: (NSString*) name object: (id) object Description forthcoming.Inherits From: NSAutoreleasePool: NSObject Declared in: NSAutoreleasePool.h
This class maintains a stack of autorelease pools
objects in each thread.
When an autorelease pool is created, it is
automatically added to the stack of pools in
the thread.
When a pool is destroyed, it (and any pool later in
the stack) is removed from the stack.
+ (void) _endThread: (NSThread*) thread Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
+ (void) addObject: (id) anObj Adds the specified object to the current autorelease
pool. If there is no autorelease pool in the thread,
a warning is logged.
+ (unsigned) autoreleaseCountForObject: (id) anObject Counts the number of times that the specified
object occurs in autorelease pools in the current
thread.
This method is slow and should probably
only be used for debugging purposes.
+ (void) enableRelease: (BOOL) enable Specifies whether objects contained in
autorelease pools are to be released when the
pools are deallocated (by default YES
).
You can set this to NO for debugging
purposes.
+ (void) freeCache When autorelease pools are deallocated, the memory
they used is retained in a cache for re-use so that
new polls can be created very quickly.
This method may be used to empty that cache,
ensuring that the minimum memory is used by the
application.
+ (void) resetTotalAutoreleasedObjects Description forthcoming.
+ (void) setPoolCountThreshhold: (unsigned) c Specifies a limit to the number of objects that
may be added to an autorelease pool. When this limit
is reached an exception is raised.
You can set this to a smallish value to catch
problems with code that autoreleases too many
objects to operate efficiently.
Default value is maxint.
+ (unsigned) totalAutoreleasedObjects Description forthcoming.
- (void) addObject: (id) anObj Adds the specified object to this autorelease pool.
Inherits From: NSPort: NSObject Conforms to: NSCodingNSCopying
Declared in: NSPort.h
Description forthcoming.
+ (NSPort*) port Description forthcoming.
+ (NSPort*) portWithMachPort: (int) machPort Description forthcoming.
- (void) addConnection: (NSConnection*) aConnection toRunLoop: (NSRunLoop*) aLoop forMode: (NSString*) aMode Description forthcoming.
- (id) delegate Description forthcoming.
- (id) init Description forthcoming.
- (id) initWithMachPort: (int) machPort Description forthcoming.
- (void) invalidate Description forthcoming.
- (BOOL) isValid Description forthcoming.
- (int) machPort Description forthcoming.
- (void) removeConnection: (NSConnection*) aConnection fromRunLoop: (NSRunLoop*) aLoop forMode: (NSString*) aMode Description forthcoming.
- (unsigned) reservedSpaceLength Description forthcoming.
- (BOOL) sendBeforeDate: (NSDate*) when components: (NSMutableArray*) components from: (NSPort*) receivingPort reserved: (unsigned) length Description forthcoming.
- (BOOL) sendBeforeDate: (NSDate*) when msgid: (int) msgid components: (NSMutableArray*) components from: (NSPort*) receivingPort reserved: (unsigned) length Description forthcoming.
- (void) setDelegate: (id) anObject Description forthcoming.Inherits From: GSXPathContext: NSObject Declared in: GSXML.h
Description forthcoming.
- (GSXPathObject*) evaluateExpression: (NSString*) XPathExpression Description forthcoming.
- (id) initWithDocument: (GSXMLDocument*) d Description forthcoming.Inherits From: NSDecimalNumberHandler: NSObject Conforms to: NSDecimalNumberBehaviors
Declared in: NSDecimalNumber.h
Description forthcoming.
+ (id) decimalNumberHandlerWithRoundingMode: (NSRoundingMode) roundingMode scale: (short) scale raiseOnExactness: (BOOL) raiseOnExactness raiseOnOverflow: (BOOL) raiseOnOverflow raiseOnUnderflow: (BOOL) raiseOnUnderflow raiseOnDivideByZero: (BOOL) raiseOnDivideByZero Description forthcoming.
+ (id) defaultDecimalNumberHandler Description forthcoming.
- (id) initWithRoundingMode: (NSRoundingMode) roundingMode scale: (short) scale raiseOnExactness: (BOOL) raiseOnExactness raiseOnOverflow: (BOOL) raiseOnOverflow raiseOnUnderflow: (BOOL) raiseOnUnderflow raiseOnDivideByZero: (BOOL) raiseOnDivideByZero Description forthcoming.Inherits From: NSULongLongNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSValue: NSObject Conforms to: NSCopyingNSCoding
Declared in: NSValue.h
Description forthcoming.
+ (NSValue*) value: (const void*) value withObjCType: (const char*) type Description forthcoming.
+ (NSValue*) valueFromString: (NSString*) string Description forthcoming.
+ (NSValue*) valueWithBytes: (const void*) value objCType: (const char*) type Description forthcoming.
+ (NSValue*) valueWithNonretainedObject: (id) anObject Description forthcoming.
+ (NSValue*) valueWithPoint: (NSPoint) point Description forthcoming.
+ (NSValue*) valueWithPointer: (const void*) pointer Description forthcoming.
+ (NSValue*) valueWithRange: (NSRange) range Description forthcoming.
+ (NSValue*) valueWithRect: (NSRect) rect Description forthcoming.
+ (NSValue*) valueWithSize: (NSSize) size Description forthcoming.
- (void) getValue: (void*) value Description forthcoming.
- (id) initWithBytes: (const void*) data objCType: (const char*) type Description forthcoming.
- (BOOL) isEqualToValue: (NSValue*) other Description forthcoming.
- (id) nonretainedObjectValue Description forthcoming.
- (const char*) objCType Description forthcoming.
- (NSPoint) pointValue Description forthcoming.
- (void*) pointerValue Description forthcoming.
- (NSRange) rangeValue Description forthcoming.
- (NSRect) rectValue Description forthcoming.
- (NSSize) sizeValue Description forthcoming.Inherits From: NSBoolNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: GSFileHandle: NSFileHandle: NSObject Conforms to: RunLoopEventsGCFinalization
Declared in: GSFileHandle.h
Description forthcoming.
- (void) checkAccept Description forthcoming.
- (void) checkConnect Description forthcoming.
- (void) checkRead Description forthcoming.
- (void) checkWrite Description forthcoming.
- (void) ignoreReadDescriptor Description forthcoming.
- (void) ignoreWriteDescriptor Description forthcoming.
- (id) initAsClientAtAddress: (NSString*) a service: (NSString*) s protocol: (NSString*) p Initialise as a client socket
connection... do this by using
[-initAsClientInBackgroundAtAddress:service:protocol:forModes:] and running the current run loop in NSDefaultRunLoopMode until the connection attempt succeeds, fails, or times out.
- (id) initAsClientInBackgroundAtAddress: (NSString*) a service: (NSString*) s protocol: (NSString*) p forModes: (NSArray*) modes A protocol fo the form 'socks-...' controls socks
operation, overriding defaults and environment
variables.
If it is just 'socks-' it
turns off socks for this fiel handle.
Otherwise, the following text must be the name
of the socks server (optionally followed by :port).
- (id) initAsServerAtAddress: (NSString*) a service: (NSString*) s protocol: (NSString*) p Description forthcoming.
- (id) initForReadingAtPath: (NSString*) path Description forthcoming.
- (id) initForUpdatingAtPath: (NSString*) path Description forthcoming.
- (id) initForWritingAtPath: (NSString*) path Description forthcoming.
- (id) initWithNullDevice Description forthcoming.
- (id) initWithStandardError Description forthcoming.
- (id) initWithStandardInput Description forthcoming.
- (id) initWithStandardOutput Description forthcoming.
- (void) postReadNotification Description forthcoming.
- (void) postWriteNotification Description forthcoming.
- (int) read: (void*) buf length: (int) len Encapsulates low level read operation to get
data from the operating system.
- (void) receivedEvent: (void*) data type: (RunLoopEventType) type extra: (void*) extra forMode: (NSString*) mode Description forthcoming.
- (void) setAddr: (struct sockaddr_in*) sin Description forthcoming.
- (void) setNonBlocking: (BOOL) flag Description forthcoming.
- (NSDate*) timedOutEvent: (void*) data type: (RunLoopEventType) type forMode: (NSString*) mode Description forthcoming.
- (BOOL) useCompression Description forthcoming.
- (void) watchReadDescriptorForModes: (NSArray*) modes Description forthcoming.
- (void) watchWriteDescriptor Description forthcoming.
- (int) write: (const void*) buf length: (int) len Encapsulates low level write operation to send
data to the operating system.
Inherits From: NSHost: NSObject Declared in: NSHost.h
Description forthcoming.
+ (NSHost*) currentHost Description forthcoming.
+ (void) flushHostCache Description forthcoming.
+ (NSHost*) hostWithAddress: (NSString*) address Description forthcoming.
+ (NSHost*) hostWithName: (NSString*) name Description forthcoming.
+ (BOOL) isHostCacheEnabled Description forthcoming.
+ (void) setHostCacheEnabled: (BOOL) flag Description forthcoming.
- (NSString*) address Description forthcoming.
- (NSArray*) addresses Description forthcoming.
- (BOOL) isEqualToHost: (NSHost*) aHost Description forthcoming.
- (NSString*) name Description forthcoming.
- (NSArray*) names Description forthcoming.Inherits From: NSString: NSObject Conforms to: NSCodingNSCopyingNSMutableCopying
Declared in: NSString.h
NSString objects represent an immutable string of
characters. NSString itself is an abstract
class which provides factory methods to generate
objects of unspecified subclasses.
A constant NSString can be created using the following
syntax: @"...", where the contents of
the quotes are the string, using only ASCII characters.
To create a concrete subclass of NSString, you must have
your class inherit from NSString and override at least
the two primitive methods - length and
characterAtIndex:
In general the rule is that your subclass must override
any initialiser that you want to use with it. The
GNUstep implementation relaxes that to say that,
you may override only the
designated initialiser and the other
initialisation methods should work.
+ (NSStringEncoding*) availableStringEncodings Returns an array of all available string encodings,
terminated by a null value.
+ (Class) constantStringClass Return the class used to store constant strings
(those ascii strings placed in the source code using
the @"this is a string" syntax).
Use this method
to obtain the constant string class rather than using
the obsolete name NXConstantString in your
code... with more recent compiler versions the name of
this class is variable (and will automatically be
changed by GNUstep to avoid conflicts with the
default implementation in the Objective-C runtime
library).
+ (NSStringEncoding) defaultCStringEncoding Returns the encoding used for any method
accepting a C string. This value is determined
automatically from the programs environment
and cannot be changed programmatically.
You should NOT override this method in an
attempt to change the encoding being used... it
won't work.
In GNUstep, this encoding is determined by the initial
value of the GNUSTEP_STRING_ENCODING
environment variable. If this is not defined,
NSISOLatin1StringEncoding is assumed.
+ (NSString*) localizedNameOfStringEncoding: (NSStringEncoding) encoding Returns the localized name of the
encoding specified.
+ (NSString*) localizedStringWithFormat: (NSString*) format Description forthcoming.
+ (NSString*) pathWithComponents: (NSArray*) components Concatenates the strings in the
components array placing a path separator
between each one and returns the result.
+ (id) string Description forthcoming.
+ (id) stringWithCString: (const char*) byteString Description forthcoming.
+ (id) stringWithCString: (const char*) byteString length: (unsigned int) length Description forthcoming.
+ (id) stringWithCharacters: (const unichar*) chars length: (unsigned int) length Description forthcoming.
+ (id) stringWithContentsOfFile: (NSString*) path Description forthcoming.
+ (id) stringWithContentsOfURL: (NSURL*) url Description forthcoming.
+ (id) stringWithFormat: (NSString*) format Description forthcoming.
+ (id) stringWithFormat: (NSString*) format arguments: (va_list) argList Description forthcoming.
+ (id) stringWithString: (NSString*) aString Description forthcoming.
+ (id) stringWithUTF8String: (const char*) bytes Description forthcoming.
- (const char*) UTF8String Description forthcoming.
- (int) _baseLength Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (BOOL) boolValue If the string consists of the words 'true' or 'yes'
(case insensitive) or begins with a non-zero numeric
value, return YES, otherwise return
NO.
- (const char*) cString Returns a pointer to a null terminated string of
8-bit characters in the default encoding. The memory
pointed to is not owned by the caller, so the
caller must copy its contents to keep it.
- (unsigned int) cStringLength Description forthcoming.
- (BOOL) canBeConvertedToEncoding: (NSStringEncoding) encoding Description forthcoming.
- (NSString*) capitalizedString Description forthcoming.
- (NSComparisonResult) caseInsensitiveCompare: (NSString*) aString Description forthcoming.
- (unichar) characterAtIndex: (unsigned int) index Description forthcoming.
- (NSString*) commonPrefixWithString: (NSString*) aString options: (unsigned int) mask Description forthcoming.
- (NSComparisonResult) compare: (NSString*) aString Description forthcoming.
- (NSComparisonResult) compare: (NSString*) aString options: (unsigned int) mask Description forthcoming.
- (NSComparisonResult) compare: (NSString*) aString options: (unsigned int) mask range: (NSRange) aRange Description forthcoming.
- (NSComparisonResult) compare: (NSString*) string options: (unsigned int) mask range: (NSRange) compareRange locale: (NSDictionary*) dict Description forthcoming.
- (unsigned int) completePathIntoString: (NSString**) outputName caseSensitive: (BOOL) flag matchesIntoArray: (NSArray**) outputArray filterTypes: (NSArray*) filterTypes Description forthcoming.
- (NSArray*) componentsSeparatedByString: (NSString*) separator Description forthcoming.
- (NSData*) dataUsingEncoding: (NSStringEncoding) encoding Description forthcoming.
- (NSData*) dataUsingEncoding: (NSStringEncoding) encoding allowLossyConversion: (BOOL) flag Description forthcoming.
- (NSString*) description Description forthcoming.
- (double) doubleValue Description forthcoming.
- (NSStringEncoding) fastestEncoding Description forthcoming.
- (const char*) fileSystemRepresentation Description forthcoming.
- (float) floatValue Description forthcoming.
- (void) getCString: (char*) buffer Retrieve the contents of the receiver into the
buffer.
The buffer must
be large enought to contain the CString representation
of the characters in the receiver, plus a null
terminator which this method adds.
- (void) getCString: (char*) buffer maxLength: (unsigned int) maxLength Retrieve up to maxLength characters
from the receiver into the buffer.
The buffer must be at least
maxLength characters long, so that it has
room for the null terminator that this method adds.
- (void) getCString: (char*) buffer maxLength: (unsigned int) maxLength range: (NSRange) aRange remainingRange: (NSRange*) leftoverRange Description forthcoming.
- (void) getCharacters: (unichar*) buffer Description forthcoming.
- (void) getCharacters: (unichar*) buffer range: (NSRange) aRange Description forthcoming.
- (BOOL) getFileSystemRepresentation: (char*) buffer maxLength: (unsigned int) size Description forthcoming.
- (void) getLineStart: (unsigned int*) startIndex end: (unsigned int*) lineEndIndex contentsEnd: (unsigned int*) contentsEndIndex forRange: (NSRange) aRange Determines the smallest range of lines
containing aRange and returns the
locations in that range.
Lines are
delimited by any of these character sequences,
the longest (CRLF) sequence preferred.
The index of the first character of the line at or
before aRange is returned in
startIndex.
The index of the first
character of the next line after the line
terminator is returned in endIndex.
The
index of the last character before the line
terminator is returned
contentsEndIndex.
Raises an
NSRangeException if the range is invalid,
but permits the index arguments to be null pointers (in
which case no value is returned in that argument).
- (BOOL) hasPrefix: (NSString*) aString Description forthcoming.
- (BOOL) hasSuffix: (NSString*) aString Description forthcoming.
- (unsigned int) hash Return 28-bit hash value (in 32-bit integer). The
top few bits are used for other purposes in a bitfield
in the concrete string subclasses, so we must not use
the full unsigned integer.
- (id) init Description forthcoming.
- (id) initWithCString: (const char*) byteString Description forthcoming.
- (id) initWithCString: (const char*) byteString length: (unsigned int) length Description forthcoming.
- (id) initWithCStringNoCopy: (char*) byteString length: (unsigned int) length freeWhenDone: (BOOL) flag Description forthcoming.
- (id) initWithCharacters: (const unichar*) chars length: (unsigned int) length Description forthcoming.
- (id) initWithCharactersNoCopy: (unichar*) chars length: (unsigned int) length freeWhenDone: (BOOL) flag This is the most basic initialiser for unicode
strings. In the GNUstep implementation, your
subclasses may override this initialiser in
order to have all others function.
- (id) initWithContentsOfFile: (NSString*) path Initialises the receiver with the contents of
the file at path.
Invokes
[NSData% unknown entity: nbsp
-initWithContentsOfFile:] to read the file, then examines the data to infer its encoding type, and converts the data to a string using -initWithData:encoding:
The encoding to use is determined as follows... if
the data begins with the 16-bit unicode Byte Order
Marker, then it is assumed to be unicode data in
the appropriate ordering and converted as such.
If it begins with a UTF8 representation of
the BOM, the UTF8 encoding is used.
Otherwise,
the default C String encoding is used.
Releases the receiver and returns
nil if the file could not be read and
converted to a string.
- (id) initWithContentsOfURL: (NSURL*) url Description forthcoming.
- (id) initWithData: (NSData*) data encoding: (NSStringEncoding) encoding Initialises the receiver with the supplied
data, using the specified
encoding.
For
NSUnicodeStringEncoding and
NSUTF8String encoding, a Byte Order
Marker (if present at the start of the
data) is removed automatically.
If
the data can not be interpreted using the
encoding, the receiver is released and
nil is returned.
- (id) initWithFormat: (NSString*) format Invokes
-initWithFormat:locale:arguments:
with a nil locale.
- (id) initWithFormat: (NSString*) format arguments: (va_list) argList Invokes
-initWithFormat:locale:arguments:
with a nil locale.
- (id) initWithFormat: (NSString*) format locale: (NSDictionary*) locale Invokes
-initWithFormat:locale:arguments:
- (id) initWithFormat: (NSString*) format locale: (NSDictionary*) locale arguments: (va_list) argList Initialises the string using the specified
format and locale to
format the following arguments.
- (id) initWithString: (NSString*) string Description forthcoming.
- (id) initWithUTF8String: (const char*) bytes Description forthcoming.
- (int) intValue Description forthcoming.
- (BOOL) isAbsolutePath Description forthcoming.
- (BOOL) isEqual: (id) anObject Description forthcoming.
- (BOOL) isEqualToString: (NSString*) aString Description forthcoming.
- (NSString*) lastPathComponent Returns a string containing the last path component
of the receiver.
The path component is the last
non-empty substring delimited by the ends of the
string or by path * separator ('/') characters.
If the receiver is an empty string, it is
simply returned.
If there are no non-empty
substrings, the root string is returned.
- (unsigned int) length Description forthcoming.
- (NSRange) lineRangeForRange: (NSRange) aRange Determines the smallest range of lines
containing aRange and returns the
information as a range.
Calls
-getLineStart:end:contentsEnd:forRange: to do the work.
- (NSComparisonResult) localizedCaseInsensitiveCompare: (NSString*) string Description forthcoming.
- (NSComparisonResult) localizedCompare: (NSString*) string Description forthcoming.
- (const char*) lossyCString Description forthcoming.
- (NSString*) lowercaseString Returns a copy of the receiver with all characters
converted to lowercase.
- (NSArray*) pathComponents Returns the path components of the reciever
separated into an array.
If the receiver
begins with a '/' character then that is used as the
first element in the array.
Empty components
are removed.
- (NSString*) pathExtension Returns a new string containing the path extension
of the receiver.
The path extension is a suffix
on the last path component which starts with the
extension separator (a '.') (for example.tiff is
the pathExtension for /foo/bar.tiff).
Returns an
empty string if no such extension exists.
- (id) propertyList Attempts to interpret the receiver as a
property list and returns the result. If
the receiver does not contain a string representation
of a property list then the method returns
nil.
There are three readable property list
storage formats - The binary format used by
NSSerializer
does not concern us here, but there are two 'human
readable' formats, the traditional
OpenStep format (which is extended in GNUstep)
and the XML format.
The
[NSArray% unknown entity: nbsp
-descriptionWithLocale:indent:] and [NSDictionary% unknown entity: nbsp
-descriptionWithLocale:indent:] methods both generate strings containing traditional style property lists, but [NSArray% unknown entity: nbsp
-writeToFile:atomically:] and [NSDictionary% unknown entity: nbsp
-writeToFile:atomically:] generate either traditional or XML style property lists depending on the value of the GSMacOSXCompatible and NSWriteOldStylePropertyLists user defaults.
If GSMacOSXCompatible is YES then XML property lists are written unless NSWriteOldStylePropertyLists is also YES.
By default GNUstep writes old style data and always supports reading of either style.
The traditional format is more compact and more
easily readable by people, but (without the
GNUstep extensions) cannot represent date and
number objects (except as strings). The XML
format is more verbose and less readable, but
can be fed into modern XML tools and thus used to
pass data to non-OpenStep applications more
readily.
The traditional format is strictly ascii encoded,
with any unicode characters represented by escape
sequences. The XML format is encoded as UTF8
data.
Both the traditional format and the XML format
permit comments to be placed in
property list documents. In traditional
format the comment notations used in ObjectiveC
programming are supported, while in XML
format, the standard SGML comment sequences are
used.
A property list may only be one of the
following classes -
- (NSDictionary*) propertyListFromStringsFileFormat Reads a property list (see -propertyList)
from a simplified file format. This format is a
traditional style property list file
containing a single dictionary, but with the
leading '{' and trailing '}' characters omitted.
That is to say, the file contains only semicolon
separated key/value pairs (and optionally
comments). As a convenience, it is possible to
omit the equals sign and the value, so an entry
consists of a key string followed by a
semicolon. In this case, the value for that
key is assumed to be an empty string.
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*) aSet Description forthcoming.
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*) aSet options: (unsigned int) mask Description forthcoming.
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*) aSet options: (unsigned int) mask range: (NSRange) aRange Description forthcoming.
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned int) anIndex Description forthcoming.
- (NSRange) rangeOfString: (NSString*) string Invokes
-rangeOfString:options:
with the options mask set to zero.
- (NSRange) rangeOfString: (NSString*) string options: (unsigned int) mask Invokes
-rangeOfString:options:range:
with the range set set to the range of the whole of
the reciever.
- (NSRange) rangeOfString: (NSString*) aString options: (unsigned int) mask range: (NSRange) aRange Returns the range giving the location and length of
the first occurrence of aString within
aRange.
If aString does
not exist in the receiver (an empty string is never
considered to exist in the receiver), the length
of the returned range is zero.
If
aString is nil, an exception
is raised.
If any part of aRange lies
outside the range of the receiver, an exception is
raised.
The options mask may
contain the following options -
- (NSStringEncoding) smallestEncoding Description forthcoming.
- (NSString*) stringByAbbreviatingWithTildeInPath Returns a string where a prefix of the current
user's home directory is abbreviated by '~', or
returns the receiver if it was not found to have
the home directory as a prefix.
- (NSString*) stringByAppendingFormat: (NSString*) format Description forthcoming.
- (NSString*) stringByAppendingPathComponent: (NSString*) aString Returns a new string with the path component given
in aString appended to the receiver. Removes
trailing separators and multiple separators.
- (NSString*) stringByAppendingPathExtension: (NSString*) aString Returns a new string with the path extension given
in aString appended to the receiver after the
extensionSeparator ('.').
If the
receiver has trailing '/' characters which are not
part of the root directory, those '/' characters are
stripped before the extension separator is added.
- (NSString*) stringByAppendingString: (NSString*) aString Description forthcoming.
- (NSString*) stringByDeletingLastPathComponent Returns a new string with the last path component
(including any final path separators) removed
from the receiver.
A string without a path
component other than the root is returned without
alteration.
See
-lastPathComponent
for a definition of a path component.
- (NSString*) stringByDeletingPathExtension Returns a new string with the path extension
removed from the receiver.
Strips any
trailing path separators before checking for the
extension separator.
Does not consider a
string starting with the extension separator ('.')
to be a path extension.
- (NSString*) stringByExpandingTildeInPath Returns a string created by expanding the initial
tilde ('~') and any following username to be the home
directory of the current user or the named user.
Returns the receiver if it was not possible
to expand it.
- (NSString*) stringByPaddingToLength: (unsigned int) newLength withString: (NSString*) padString startingAtIndex: (unsigned int) padIndex Returns a string formed by extending or truncating
the receiver to newLength characters. If the
new string is larger, it is padded by appending
characters from padString (appending
it as many times as required). The first character from
padString to be appended is specified by
padIndex.
- (NSString*) stringByResolvingSymlinksInPath Description forthcoming.
- (NSString*) stringByStandardizingPath Returns a standardised form of the receiver, with
unnecessary parts removed, tilde characters
expanded, and symbolic links resolved where
possible.
If the string is an invalid
path, the unmodified receiver is returned.
Uses
-stringByExpandingTildeInPath
to expand tilde expressions.
Simplifies '//'
and '/./' sequences.
Removes any '/private'
prefix.
For absolute paths, uses
-stringByResolvingSymlinksInPath to resolve any links, then gets rid of '/../' sequences.
- (NSString*) stringByTrimmingCharactersInSet: (NSCharacterSet*) aSet Return a string formed by removing characters from
the ends of the receiver. Characters are removed only
if they are in aSet.
If the string
consists entirely of characters in aSet
, an empty string is returned.
The aSet
argument nust not be nil.
- (NSArray*) stringsByAppendingPaths: (NSArray*) paths Returns an array of strings made by appending the
values in paths to the receiver.
- (NSString*) substringFromIndex: (unsigned int) index Returns a substring of the receiver from character
at the specified index to the end of the
string.
So, supplying an index of
3 would return a substring consisting of the entire
string apart from the first three character (those
would be at index 0, 1, and 2).
If
the supplied index is greater than or equal
to the length of the receiver an exception is raised.
- (NSString*) substringFromRange: (NSRange) aRange An obsolete name for
-substringWithRange:
... deprecated.
- (NSString*) substringToIndex: (unsigned int) index Returns a substring of the receiver from the start
of the string to (but not including) the specified
index position.
So, supplying an
index of 3 would return a substring
consisting of the first three characters of the
receiver.
If the supplied index
is greater than the length of the receiver an exception
is raised.
- (NSString*) substringWithRange: (NSRange) aRange Returns a substring of the receiver containing the
characters in aRange.
If
aRange specifies any character position
not present in the receiver, an exception is raised.
If aRange has a length of zero, an
empty string is returned.
- (NSString*) uppercaseString Returns a copy of the receiver with all characters
converted to uppercase.
- (BOOL) writeToFile: (NSString*) filename atomically: (BOOL) useAuxiliaryFile Description forthcoming.
- (BOOL) writeToURL: (NSURL*) anURL atomically: (BOOL) atomically Description forthcoming.Inherits From: NSUndoManager: NSObject Declared in: NSUndoManager.h
Description forthcoming.
- (void) beginUndoGrouping Description forthcoming.
- (BOOL) canRedo Description forthcoming.
- (BOOL) canUndo Description forthcoming.
- (void) disableUndoRegistration Description forthcoming.
- (void) enableUndoRegistration Description forthcoming.
- (void) endUndoGrouping Description forthcoming.
- (void) forwardInvocation: (NSInvocation*) anInvocation Description forthcoming.
- (int) groupingLevel Description forthcoming.
- (BOOL) groupsByEvent Description forthcoming.
- (BOOL) isRedoing Description forthcoming.
- (BOOL) isUndoRegistrationEnabled Description forthcoming.
- (BOOL) isUndoing Description forthcoming.
- (unsigned int) levelsOfUndo Description forthcoming.
- (id) prepareWithInvocationTarget: (id) target Description forthcoming.
- (void) redo Description forthcoming.
- (NSString*) redoActionName Description forthcoming.
- (NSString*) redoMenuItemTitle Description forthcoming.
- (NSString*) redoMenuTitleForUndoActionName: (NSString*) name Description forthcoming.
- (void) registerUndoWithTarget: (id) target selector: (SEL) aSelector object: (id) anObject Description forthcoming.
- (void) removeAllActions Description forthcoming.
- (void) removeAllActionsWithTarget: (id) target Description forthcoming.
- (NSArray*) runLoopModes Description forthcoming.
- (void) setActionName: (NSString*) name Description forthcoming.
- (void) setGroupsByEvent: (BOOL) flag Description forthcoming.
- (void) setLevelsOfUndo: (unsigned) num Description forthcoming.
- (void) setRunLoopModes: (NSArray*) newModes Description forthcoming.
- (void) undo Description forthcoming.
- (NSString*) undoActionName Description forthcoming.
- (NSString*) undoMenuItemTitle Description forthcoming.
- (NSString*) undoMenuTitleForUndoActionName: (NSString*) name Description forthcoming.
- (void) undoNestedGroup Description forthcoming.Inherits From: NSMutableData: NSData: NSObject Declared in: NSData.h
Description forthcoming.
+ (id) dataWithCapacity: (unsigned int) numBytes Description forthcoming.
+ (id) dataWithLength: (unsigned int) length Description forthcoming.
- (void) appendBytes: (const void*) aBuffer length: (unsigned int) bufferSize Description forthcoming.
- (void) appendData: (NSData*) other Description forthcoming.
- (void) increaseLengthBy: (unsigned int) extraLength Description forthcoming.
- (id) initWithCapacity: (unsigned int) capacity Description forthcoming.
- (id) initWithLength: (unsigned int) length Description forthcoming.
- (void*) mutableBytes Returns a pointer to the data storage of the
receiver.
Modifications to the memory
pointed to by this pointer will change the
contents of the object. It is important that
your code should not try to modify the memory beyond
the number of bytes given by the
-length
method.
NB. if the object is released, or any method that
changes its size or content is called, then the
pointer previously returned by this method may
cease to be valid.
This is a 'primitive' method... you need to
implement it if you write a subclass of
NSMutableData.
- (void) replaceBytesInRange: (NSRange) aRange withBytes: (const void*) bytes Replaces the bytes of data in the
specified range with a copy of the new
bytes supplied.
If the location of
the range specified lies beyond the end of the data (
[self length] % unknown entity: lt
range.location) then
a range exception is raised.
Otherwise, if the
range specified extends beyond the end of the data,
then the size of the data is increased to accomodate
the new bytes.
- (void) replaceBytesInRange: (NSRange) aRange withBytes: (const void*) bytes length: (unsigned int) length Replace the content of the receiver which lies in
aRange with the specified
length of data from the buffer pointed to
by bytes.
The size of the receiver is
adjusted to allow for the change.
- (void) resetBytesInRange: (NSRange) aRange Description forthcoming.
- (void) serializeAlignedBytesLength: (unsigned int) length Description forthcoming.
- (void) serializeDataAt: (const void*) data ofObjCType: (const char*) type context: (id<NSObjCTypeSerializationCallBack>) callback Description forthcoming.
- (void) serializeInt: (int) value Description forthcoming.
- (void) serializeInt: (int) value atIndex: (unsigned int) index Description forthcoming.
- (void) serializeInts: (int*) intBuffer count: (unsigned int) numInts Description forthcoming.
- (void) serializeInts: (int*) intBuffer count: (unsigned int) numInts atIndex: (unsigned int) index Description forthcoming.
- (void) setData: (NSData*) data Description forthcoming.
- (void) setLength: (unsigned int) size Sets the length of the NSMutableData object. If the
length is increased, the newly allocated data area
is filled with zero bytes.
This is a 'primitive' method... you need to
implement it if you write a subclass of
NSMutableData.
Inherits From: NSMethodSignature: NSObject Declared in: NSMethodSignature.h
Description forthcoming.
+ (NSMethodSignature*) signatureWithObjCTypes: (const char*) t Description forthcoming.
- (NSArgumentInfo) argumentInfoAtIndex: (unsigned) index Description forthcoming.
- (unsigned) frameLength Description forthcoming.
- (const char*) getArgumentTypeAtIndex: (unsigned) index Description forthcoming.
- (BOOL) isOneway Description forthcoming.
- (unsigned) methodReturnLength Description forthcoming.
- (const char*) methodReturnType Description forthcoming.
- (unsigned) numberOfArguments Description forthcoming.Inherits From: NSUCharNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSCharacterSet: NSObject Conforms to: NSCodingNSCopyingNSMutableCopying
Declared in: NSCharacterSet.h
Description forthcoming.
+ (NSCharacterSet*) alphanumericCharacterSet Description forthcoming.
+ (NSCharacterSet*) characterSetWithBitmapRepresentation: (NSData*) data Returns a character set containing characters as
encoded in the data object.
+ (NSCharacterSet*) characterSetWithCharactersInString: (NSString*) aString Description forthcoming.
+ (NSCharacterSet*) characterSetWithContentsOfFile: (NSString*) aFile Description forthcoming.
+ (NSCharacterSet*) characterSetWithRange: (NSRange) aRange Description forthcoming.
+ (NSCharacterSet*) controlCharacterSet Description forthcoming.
+ (NSCharacterSet*) decimalDigitCharacterSet Returns a character set containing characters that
represent the decimal digits 0 through 9.
+ (NSCharacterSet*) decomposableCharacterSet Returns a character set containing individual
charactars that can be represented also by a
composed character sequence.
+ (NSCharacterSet*) illegalCharacterSet Returns a character set containing unassigned
(illegal) character values.
+ (NSCharacterSet*) letterCharacterSet Description forthcoming.
+ (NSCharacterSet*) lowercaseLetterCharacterSet Returns a character set that contains the lowercase
characters. This set does not include caseless
characters, only those that have corresponding
characters in uppercase and/or titlecase.
+ (NSCharacterSet*) nonBaseCharacterSet Description forthcoming.
+ (NSCharacterSet*) punctuationCharacterSet Description forthcoming.
+ (NSCharacterSet*) symbolAndOperatorCharacterSet Description forthcoming.
+ (NSCharacterSet*) uppercaseLetterCharacterSet Returns a character set that contains the uppercase
characters. This set does not include caseless
characters, only those that have corresponding
characters in lowercase and/or titlecase.
+ (NSCharacterSet*) whitespaceAndNewlineCharacterSet Returns a character set that contains the
whitespace characters, plus the newline
characters, values 0x000A and 0x000D.
+ (NSCharacterSet*) whitespaceCharacterSet Returns a character set that contains the
whitespace characters.
- (NSData*) bitmapRepresentation Returns a bitmap representation of the receiver's
character set suitable for archiving or writing
to a file, in an NSData object.
- (BOOL) characterIsMember: (unichar) aCharacter Returns YES if the receiver contains
aCharacter, NO if it
does not.
- (NSCharacterSet*) invertedSet Returns a character set containing only characters
that the receiver does not contain.
Inherits From: NSTask: NSObject Conforms to: GCFinalization
Declared in: NSTask.h
The NSTask class provides a mechanism to run separate
tasks under (limited) control of your program.
+ (NSTask*) launchedTaskWithLaunchPath: (NSString*) path arguments: (NSArray*) args Creates and launches a task, returning an
autoreleased task object. Supplies the
path to the executable and an array of
argument. The task inherits the parents
environment and I/O.
- (NSArray*) arguments Returns the arguments set for the task.
- (NSString*) currentDirectoryPath Returns the working directory set for the task.
- (NSDictionary*) environment Returns the environment set for the task.
- (void) interrupt Sends an interrupt signal to the receiver and any
subtasks.
If the task has not been
launched, raises an NSInvalidArgumentException.
Has no effect on a task that has already
terminated.
This is rather like the
terminate method, but the child process may not
choose to terminate in response to an interrupt.
- (BOOL) isRunning Checks to see if the task is currently running.
- (void) launch Launches the task.
Raises an
NSInvalidArgumentException if
the launch path is not set or if the subtask cannot be
started for some reason (eg. the executable does
not exist).
- (NSString*) launchPath Returns the launch path set for the task.
- (int) processIdentifier Returns the number identifying the child process on
this system.
- (BOOL) resume Sends a cont signal to the receiver and any subtasks.
If the task has not been launched, raises an
NSInvalidArgumentException.
- (void) setArguments: (NSArray*) args Sets an array of arguments to be supplied to the task
when it is launched. The default is an empty array.
This method cannot be used after a task is launched...
it raises an NSInvalidArgumentException.
- (void) setCurrentDirectoryPath: (NSString*) path Sets the home directory in which the task is to be
run. The default is the parent processes directory.
This method cannot be used after a task is launched...
it raises an NSInvalidArgumentException.
- (void) setEnvironment: (NSDictionary*) env Sets the environment variables for the task to be run.
The default is the parent processes environment. This
method cannot be used after a task is launched... it
raises an NSInvalidArgumentException.
- (void) setLaunchPath: (NSString*) path Sets the path to the executable file to be
run. There is no default for this - you must set the
launch path. This method cannot be used
after a task is launched... it raises an
NSInvalidArgumentException.
- (void) setStandardError: (id) hdl Sets the standard error stream for the task.
This is normally a writable NSFileHandle object. If
this is an NSPipe, the write end of the pipe is
automatically closed on launching.
The
default behavior is to inherit the parent processes
stderr output.
This method cannot be used
after a task is launched... it raises an
NSInvalidArgumentException.
- (void) setStandardInput: (id) hdl Sets the standard input stream for the task.
This is normally a readable NSFileHandle object. If
this is an NSPipe, the read end of the pipe is
automatically closed on launching.
The
default behavior is to inherit the parent processes
stdin stream.
This method cannot be used after
a task is launched... it raises an
NSInvalidArgumentException.
- (void) setStandardOutput: (id) hdl Sets the standard output stream for the task.
This is normally a writable NSFileHandle object. If
this is an NSPipe, the write end of the pipe is
automatically closed on launching.
The
default behavior is to inherit the parent processes
stdout stream.
This method cannot be used
after a task is launched... it raises an
NSInvalidArgumentException.
- (id) standardError Returns the standard error stream for the task - an
NSFileHandle unless an NSPipe was passed to
-setStandardError:
- (id) standardInput Returns the standard input stream for the task - an
NSFileHandle unless an NSPipe was passed to
-setStandardInput:
- (id) standardOutput Returns the standard output stream for the task -
an NSFileHandle unless an NSPipe was passed to
-setStandardOutput:
- (BOOL) suspend Sends a stop signal to the receiver and any subtasks.
If the task has not been launched, raises an
NSInvalidArgumentException.
- (void) terminate Sends a terminate signal to the receiver and any
subtasks.
If the task has not been
launched, raises an NSInvalidArgumentException.
Has no effect on a task that has already
terminated.
When a task temrinates,
either due to this method being called, or normal
termination, an NSTaskDidTerminateNotification
is posted.
- (int) terminationStatus Returns the termination status of the task.
If the task has not completed running, raises an
NSInvalidArgumentException.
- (BOOL) usePseudoTerminal If the system supports it, this method sets the standard
input, output, and error streams to a
pseudo-terminal so that, when launched, the
child task will act as if it was running
interactively on a terminal. The file handles
can then be used to communicate with the child.
This method cannot be used after a task is launched...
it raises an NSInvalidArgumentException.
The
standard input, output and error streams cannot be
changed after calling this method.
The
method returns YES on success,
NO on failure.
- (NSString*) validatedLaunchPath Returns a validated launch path or nil
.
Allows for the GNUstep host/operating system,
and library combination subdirectories in a path,
appending them as necessary to try to locate the
actual binary to be used.
Checks that the
binary file exists and is executable.
Even
tries searching the directories in the PATH
environment variable to locate a binary if the
original alunch path set was not absolute.
- (void) waitUntilExit Suspends the current thread until the task
terminates, by waiting in NSRunLoop
(NSDefaultRunLoopMode) for the task
termination.
Returns immediately if the
task is not running.
Inherits From: NSFileHandle: NSObject Declared in: NSFileHandle.h
NSFileHandler is a Class that provides a
wrapper for accessing system files and other
connections. You can open connections to a
file using class methods such as
+fileHandleForReadingAtPath:
.
GNUstep extends the use of this Class to allow you
to create network connections (sockets), secure
connections and also allows you to use
compression with these files and connections
(as long as GNUstep Base was compiled with the zlib
library).
+ (id) fileHandleForReadingAtPath: (NSString*) path Returns an NSFileHandle object setup for reading
from the file listed at path. If the file
does not exist or cannot be opened for some other
reason, nil is returned.
+ (id) fileHandleForUpdatingAtPath: (NSString*) path Returns an NSFileHandle object setup for updating
(reading and writing) from the file listed at
path. If the file does not exist or cannot
be opened for some other reason, nil is
returned.
+ (id) fileHandleForWritingAtPath: (NSString*) path Returns an NSFileHandle object setup for writing to
the file listed at path. If the file does
not exist or cannot be opened for some other reason,
nil is returned.
+ (id) fileHandleWithNullDevice Returns a file handle object that is connected to
the null device (i.e. a device that does nothing.) It
is typically used in arrays and other collections of
file handle objects as a place holder (null) object,
so that all objects can respond to the same messages.
+ (id) fileHandleWithStandardError Returns an NSFileHandle object for the standard
error descriptor. The returned object is a shared
instance as there can only be one standard error
per process.
+ (id) fileHandleWithStandardInput Returns an NSFileHandle object for the standard
input descriptor. The returned object is a shared
instance as there can only be one standard input
per process.
+ (id) fileHandleWithStandardOutput Returns an NSFileHandle object for the standard
output descriptor. The returned object is a shared
instance as there can only be one standard output
per process.
- (void) acceptConnectionInBackgroundAndNotify Description forthcoming.
- (void) acceptConnectionInBackgroundAndNotifyForModes: (NSArray*) modes Description forthcoming.
- (NSData*) availableData Description forthcoming.
- (void) closeFile Description forthcoming.
- (int) fileDescriptor Description forthcoming.
- (id) initWithFileDescriptor: (int) desc Description forthcoming.
- (id) initWithFileDescriptor: (int) desc closeOnDealloc: (BOOL) flag Description forthcoming.
- (id) initWithNativeHandle: (void*) hdl Description forthcoming.
- (id) initWithNativeHandle: (void*) hdl closeOnDealloc: (BOOL) flag Description forthcoming.
- (void*) nativeHandle Description forthcoming.
- (unsigned long long) offsetInFile Description forthcoming.
- (NSData*) readDataOfLength: (unsigned int) len Description forthcoming.
- (NSData*) readDataToEndOfFile Description forthcoming.
- (void) readInBackgroundAndNotify Call
-readInBackgroundAndNotifyForModes: with nil modes.
- (void) readInBackgroundAndNotifyForModes: (NSArray*) modes Set up an asynchonous read operation which will cause a
notification to be sent when any amount of
data (or end of file) is read. Note that the file
handle will not continuously send notifications when
data is available. If you want to continue to receive
notifications, you need to send this message
again after receiving a notification.
- (void) readToEndOfFileInBackgroundAndNotify Call
-readToEndOfFileInBackgroundAndNotifyForModes: with nil modes.
- (void) readToEndOfFileInBackgroundAndNotifyForModes: (NSArray*) modes Set up an asynchonous read operation which will cause a
notification to be sent when end of file is
read.
- (unsigned long long) seekToEndOfFile Description forthcoming.
- (void) seekToFileOffset: (unsigned long long) pos Description forthcoming.
- (void) synchronizeFile Description forthcoming.
- (void) truncateFileAtOffset: (unsigned long long) pos Description forthcoming.
- (void) waitForDataInBackgroundAndNotify Call
-waitForDataInBackgroundAndNotifyForModes: with nil modes.
- (void) waitForDataInBackgroundAndNotifyForModes: (NSArray*) modes Set up to provide a notification when data can be read
from the handle.
- (void) writeData: (NSData*) item Description forthcoming.Inherits From: WindowsFileHandle: NSFileHandle: NSObject Conforms to: RunLoopEvents
Declared in: WindowsFileHandle.h
Description forthcoming.
- (void) checkAccept Description forthcoming.
- (void) checkConnect Description forthcoming.
- (void) checkRead Description forthcoming.
- (void) checkWrite Description forthcoming.
- (void) ignoreReadDescriptor Description forthcoming.
- (void) ignoreWriteDescriptor Description forthcoming.
- (id) initAsClientAtAddress: (id) address service: (id) service protocol: (id) protocol Description forthcoming.
- (id) initAsClientInBackgroundAtAddress: (id) address service: (id) service protocol: (id) protocol forModes: (id) modes Description forthcoming.
- (id) initAsServerAtAddress: (id) address service: (id) service protocol: (id) protocol Description forthcoming.
- (id) initForReadingAtPath: (NSString*) path Description forthcoming.
- (id) initForUpdatingAtPath: (NSString*) path Description forthcoming.
- (id) initForWritingAtPath: (NSString*) path Description forthcoming.
- (id) initWithNullDevice Description forthcoming.
- (id) initWithStandardError Description forthcoming.
- (id) initWithStandardInput Description forthcoming.
- (id) initWithStandardOutput Description forthcoming.
- (void) postReadNotification Description forthcoming.
- (void) postWriteNotification Description forthcoming.
- (void) receivedEvent: (void*) data type: (RunLoopEventType) type extra: (void*) extra forMode: (NSString*) mode Description forthcoming.
- (void) setNonBlocking: (BOOL) flag Description forthcoming.
- (NSDate*) timedOutEvent: (void*) data type: (RunLoopEventType) type forMode: (NSString*) mode Description forthcoming.
- (void) watchReadDescriptorForModes: (NSArray*) modes Description forthcoming.
- (void) watchWriteDescriptor Description forthcoming.Inherits From: NSPortCoder: NSCoder: NSObject Declared in: NSPortCoder.h
Description forthcoming.
+ (NSPortCoder*) portCoderWithReceivePort: (NSPort*) recv sendPort: (NSPort*) send components: (NSArray*) comp Description forthcoming.
- (NSConnection*) connection Description forthcoming.
- (NSPort*) decodePortObject Description forthcoming.
- (void) dispatch Description forthcoming.
- (void) encodePortObject: (NSPort*) aPort Description forthcoming.
- (id) initWithReceivePort: (NSPort*) recv sendPort: (NSPort*) send components: (NSArray*) comp Description forthcoming.
- (BOOL) isBycopy Description forthcoming.
- (BOOL) isByref Description forthcoming.Inherits From: NSShortNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSTimeZone: NSObject Declared in: NSTimeZone.h
If the GNUstep time zone datafiles become too out of
date, one can download an updated database from
and compile it as specified in the README file in the
NSTimeZones directory.
Time zone names in NSDates should be GMT, MET etc. not
Europe/Berlin, America/Washington etc.
The problem with this is that various time zones may
use the same abbreviation (e.g. Australia/Brisbane and
America/New_York both use EST), and some
time zones may have different rules for daylight
saving time even if the abbreviation and offsets
from UTC are the same.
The problems with depending on the OS for providing
time zone info are that some methods for the
NSTimeZone classes might be difficult to
implement, and also that time zone names may
vary wildly between OSes (this could be a big problem
when archiving is used between different systems).
+ (NSDictionary*) abbreviationDictionary Description forthcoming.
+ (NSDictionary*) abbreviationMap Description forthcoming.
+ (NSTimeZone*) defaultTimeZone Return the default time zone for this process.
+ (NSTimeZone*) localTimeZone Return a proxy to the default time zone for this
process.
+ (void) resetSystemTimeZone Destroy the system time zone so that it will be
recreated next time it is used.
+ (void) setDefaultTimeZone: (NSTimeZone*) aTimeZone Set the default time zone to be used for this process.
+ (NSTimeZone*) systemTimeZone Returns the current system time zone for the
process.
+ (NSArray*) timeZoneArray Description forthcoming.
+ (NSTimeZone*) timeZoneForSecondsFromGMT: (int) seconds Return a timezone for the specified offset from GMT.
The timezone returned does not use
daylight savings time. The actual timezone
returned has an offset rounded to the nearest
minute.
Time zones with an offset of more
than +/- 18 hours are disallowed, and nil
is returned.
+ (NSTimeZone*) timeZoneWithAbbreviation: (NSString*) abbreviation Returns a timezone for the specified abbrevition,
+ (NSTimeZone*) timeZoneWithName: (NSString*) aTimeZoneName Returns a timezone for the specified name.
+ (NSTimeZone*) timeZoneWithName: (NSString*) name data: (NSData*) data Returns a timezone for the specified
name, created from the supplied
data.
- (NSString*) abbreviation Returns the abbreviation for this timezone now.
Invokes
-abbreviationForDate:
- (NSString*) abbreviationForDate: (NSDate*) aDate Returns the abbreviation for this timezone at
aDate. This may differ depending on
whether daylight savings time is in effect or not.
- (NSData*) data Returns the data with which the receiver was
initialised.
- (id) initWithName: (NSString*) name Initialise a timezone with the supplied
name. May return a cached timezone object
rather than the newly created one.
- (id) initWithName: (NSString*) name data: (NSData*) data Initialises a time zone object using the
supplied data object.
This
method is intended for internal use by the
NSTimeZone class cluster. Don't use it... use
-initWithName:
instead.
- (BOOL) isDaylightSavingTime Returns a boolean indicating whether daylight
savings time is in effect now. Invokes
-isDaylightSavingTimeForDate:
- (BOOL) isDaylightSavingTimeForDate: (NSDate*) aDate Returns a boolean indicating whether daylight
savings time is in effect for this time zone at
aDate.
- (BOOL) isEqualToTimeZone: (NSTimeZone*) aTimeZone Description forthcoming.
- (NSString*) name Description forthcoming.
- (int) secondsFromGMT Returns the number of seconds by which the receiver
differs from Greenwich Mean Time at the current
date and time.
Invokes
-secondsFromGMTForDate:
- (int) secondsFromGMTForDate: (NSDate*) aDate Returns the number of seconds by which the receiver
differs from Greenwich Mean Time at the date
aDate.
If the time zone uses
dayl;ight savings time, the returned value will
vary at different times of year.
- (NSArray*) timeZoneDetailArray Description forthcoming.
- (NSTimeZoneDetail*) timeZoneDetailForDate: (NSDate*) date Description forthcoming.
- (NSString*) timeZoneName Description forthcoming.Inherits From: GCDictionary: NSDictionary: NSObject Declared in: GCObject.h
Description forthcoming.Inherits From: NSScanner: NSObject Conforms to: NSCopying
Declared in: NSScanner.h
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.
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).
+ (id) localizedScannerWithString: (NSString*) aString Returns an NSScanner instance set up to scan
aString (using
-initWithString:
and with a locale set the default locale (using
-setLocale:
+ (id) scannerWithString: (NSString*) aString Description forthcoming.
- (BOOL) caseSensitive 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.
The
default is for a scanner to not be case
sensitive.
- (NSCharacterSet*) charactersToBeSkipped 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.
The default for this is the
whitespaceAndNewlineCharacterSet.
- (id) initWithString: (NSString*) aString 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.
Returns the scanner object.
- (BOOL) isAtEnd Returns YES if no more characters
remain to be scanned.
Returns
YES if all characters remaining to be
scanned are to be skipped.
Returns
NO if there are characters left to
scan.
- (NSDictionary*) locale 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.
- (BOOL) scanCharactersFromSet: (NSCharacterSet*) aSet intoString: (NSString**) value After initial skipping (if any), this method scans
any characters from aSet, terminating when a
character not in the set is found.
Returns
YES if any character is scanned,
NO otherwise.
If
value is not null, any character scanned
are stored in a string returned in this location.
- (BOOL) scanDecimal: (NSDecimal*) value Not implemented.
- (BOOL) scanDouble: (double*) value After initial skipping (if any), this method scans a
double value, placing it in
doubleValue if that is not null. Returns
YES if anything is scanned,
NO otherwise.
On overflow,
HUGE_VAL or - HUGE_VAL is put into
doubleValue
On underflow, 0.0 is put
into doubleValue
Scans past any excess
digits
- (BOOL) scanFloat: (float*) value After initial skipping (if any), this method scans a
float value, placing it in
floatValue if that is not null. Returns
YES if anything is scanned,
NO otherwise.
On overflow,
HUGE_VAL or - HUGE_VAL is put into
floatValue
On underflow, 0.0 is put
into floatValue
Scans past any excess
digits
- (BOOL) scanHexInt: (unsigned int*) value After initial skipping (if any), this method scans a
hexadecimal integer value
(optionally prefixed by "0x" or "0X"), placing
it in intValue if that is not null.
Returns YES if anything is scanned,
NO otherwise.
On overflow,
INT_MAX or INT_MIN is put into intValue
Scans past any excess digits
- (BOOL) scanInt: (int*) value After initial skipping (if any), this method scans a
integer value, placing it in
intValue if that is not null.
Returns
YES if anything is scanned,
NO otherwise.
On overflow,
INT_MAX or INT_MIN is put into intValue
Scans past any excess digits
- (unsigned) scanLocation 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.
- (BOOL) scanLongLong: (long long*) value After initial skipping (if any), this method scans a
long decimal integer value placing it in
longLongValue if that is not null.
Returns YES if anything is scanned,
NO otherwise.
On overflow,
LONG_LONG_MAX or LONG_LONG_MIN is put into
longLongValue
Scans past any excess
digits
- (BOOL) scanRadixUnsignedInt: (unsigned int*) value After initial skipping (if any), this method scans an
unsigned integer value placing it in
intValue 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.
Returns YES
if anything is scanned, NO otherwise.
On overflow, INT_MAX or INT_MIN is put into
intValue
Scans past any excess digits
- (BOOL) scanString: (NSString*) string intoString: (NSString**) value After initial skipping (if any), this method scans
for aString and places the string
ound in stringValue if that is not null.
Returns YES if anything is
scanned, NO otherwise.
- (BOOL) scanUpToCharactersFromSet: (NSCharacterSet*) aSet intoString: (NSString**) value After initial skipping (if any), this method scans
characters until it finds one in set.
The scanned characters are placed in
stringValue if that is not null.
Returns YES if anything is scanned,
NO otherwise.
- (BOOL) scanUpToString: (NSString*) string intoString: (NSString**) value After initial skipping (if any), this method scans
characters until it finds aString. The
scanned characters are placed in
stringValue if that is not null. If
aString is not found, all the characters up
to the end of the scanned string will be
returned.
Returns YES if
anything is scanned, NO otherwise.
- (void) setCaseSensitive: (BOOL) flag Sets the case sensitivity of the scanner.
Case
sensitivity governs matching of characters
being scanned, but does not effect the characters in
the set to be skipped.
The default is for a
scanner to not be case sensitive.
- (void) setCharactersToBeSkipped: (NSCharacterSet*) aSet Sets the set of characters that the scanner will skip
over at the start of each scanning operation to be
skipSet. 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.
The
default for this is the
whitespaceAndNewlineCharacterSet.
- (void) setLocale: (NSDictionary*) localeDictionary This method sets the locale used by the scanner to
aLocale. The locale may be set to
nil.
- (void) setScanLocation: (unsigned int) anIndex 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.
- (NSString*) string Returns the string being scanned.
Inherits From: NSCalendarDate: NSDate: NSObject Declared in: NSCalendarDate.h
An
NSDate
subclass which understands about timezones and
provides methods for dealing with date and time
information by calendar and with hours minutes
and seconds.
+ (id) calendarDate Return an NSCalendarDate for the current date and
time using the default timezone.
+ (id) dateWithString: (NSString*) description calendarFormat: (NSString*) format Return an NSCalendarDate generated from the supplied
description using the format
specified for parsing that string.
Calls
-initWithString:calendarFormat:
to create the date.
+ (id) dateWithString: (NSString*) description calendarFormat: (NSString*) format locale: (NSDictionary*) dictionary Return an NSCalendarDate generated from the supplied
description using the format
specified for parsing that string and
interpreting it according to the
dictionary specified.
Calls
-initWithString:calendarFormat:locale: to create the date.
+ (id) dateWithYear: (int) year month: (unsigned int) month day: (unsigned int) day hour: (unsigned int) hour minute: (unsigned int) minute second: (unsigned int) second timeZone: (NSTimeZone*) aTimeZone Creates and returns an NSCalendarDate from the
specified values by calling
-initWithYear:month:day:hour:minute:second:timeZone:
- (NSCalendarDate*) addYear: (int) year month: (int) month day: (int) day hour: (int) hour minute: (int) minute second: (int) second This method exists solely for conformance to the
OpenStep spec. Its use is deprecated... it simply
calls
-dateByAddingYears:months:days:hours:minutes:seconds:
- (NSString*) calendarFormat Returns the format string associated with the
receiver.
See
-descriptionWithCalendarFormat:locale: for details.
- (int) dayOfCommonEra Return the day number (ie number of days since the
start of) in the 'common' era of the receiving date.
The era starts at 1 A.D.
- (int) dayOfMonth Return the month (1 to 31) of the receiving date.
- (int) dayOfWeek Return the day of the week (0 to 6) of the receiving
date.
- (int) dayOfYear Return the day of the year (1 to 366) of the
receiving date.
- (NSString*) description Calls
-descriptionWithCalendarFormat:locale: passing the receviers calendar format and a nil locale.
- (NSString*) descriptionWithCalendarFormat: (NSString*) format Returns a string representation of the receiver
using the specified format string.
Calls
-descriptionWithCalendarFormat:locale: with a nil locale.
- (NSString*) descriptionWithCalendarFormat: (NSString*) format locale: (NSDictionary*) locale Returns a string representation of the receiver
using the specified format string and
locale dictionary.
Format
specifiers are -
- (NSString*) descriptionWithLocale: (NSDictionary*) locale Returns a description of the receiver using its
normal format but with the specified
locale dictionary.
Calls
-descriptionWithCalendarFormat:locale: to do this.
- (int) hourOfDay Return the hour of the day (0 to 23) of the
receiving date.
- (id) initWithString: (NSString*) description Initializes an NSCalendarDate using the
specified description and the default
calendar format and locale.
Calls
-initWithString:calendarFormat:locale:
- (id) initWithString: (NSString*) description calendarFormat: (NSString*) format Initializes an NSCalendarDate using the
specified description and
format string interpreted in the default
locale.
Calls
-initWithString:calendarFormat:locale:
- (id) initWithString: (NSString*) description calendarFormat: (NSString*) fmt locale: (NSDictionary*) locale Initializes an NSCalendarDate using the
specified description and format
string interpreted in the given locale.
Format specifiers are -
- (id) initWithYear: (int) year month: (unsigned int) month day: (unsigned int) day hour: (unsigned int) hour minute: (unsigned int) minute second: (unsigned int) second timeZone: (NSTimeZone*) aTimeZone Returns an NSCalendarDate instance with the given
year, month, day,
hour, minute, and
second, using aTimeZone.
The year includes the century (ie you can't
just say '02' when you mean '2002').
The
month is in the range 1 to 12,
The
day is in the range 1 to 31,
The
hour is in the range 0 to 23,
The
minute is in the range 0 to 59,
The
second is in the range 0 to 59.
If
aTimeZone is nil, the
[NSTimeZone% unknown entity: nbsp
+localTimeZone]
value is used.
GNUstep checks the validity of the method
arguments, and unless the base library was
built with 'warn=no' it generates a warning for bad
values. It tries to use those bad values to
generate a date anyway though, rather than
failing (this also appears to be the behavior of
MacOS-X).
The algorithm GNUstep uses to create the date is this
...
- (int) minuteOfHour Return the minute of the hour (0 to 59) of the
receiving date.
- (int) monthOfYear Return the month of the year (1 to 12) of the
receiving date.
- (int) secondOfMinute Return the second of the minute (0 to 59) of the
receiving date.
- (void) setCalendarFormat: (NSString*) format Sets the format string associated with the
receiver.
See
-descriptionWithCalendarFormat:locale: for details.
- (void) setTimeZone: (NSTimeZone*) aTimeZone Sets the time zone associated with the receiver.
- (NSTimeZone*) timeZone Returns the time zone associated with the receiver.
- (NSTimeZoneDetail*) timeZoneDetail Returns the time zone detail associated with the
receiver.
- (int) yearOfCommonEra Return the year of the 'common' era of the receiving
date. The era starts at 1 A.D.
Inherits From: NSLock: NSObject Conforms to: NSLockingGCFinalization
Declared in: NSLock.h
An NSLock is used in multi-threaded applications to
protect critical pieces of code. While one thread
holds a lock within a piece of code, another thread
cannot execute that code until the first thread has
given up it's hold on the lock. The limitation of
NSLock is that you can only lock an NSLock once and it
must be unlocked before it can be aquired again.
Other lock classes, notably NSRecursiveLock, have
different restrictions.
- (void) lock Attempts to aquire a lock, and waits until it can
do so.
- (BOOL) lockBeforeDate: (NSDate*) limit Attempts to aquire a lock before the date
limit passes. It returns YES
if it can. It returns NO if it cannot, or
if the current thread already has the lock (but it waits
until the time limit is up before
returning NO).
- (BOOL) tryLock Attempts to aquire a lock, but returns immediately
if the lock cannot be aquired. It returns
YES if the lock is aquired. It returns
NO if the lock cannot be aquired or if
the current thread already has the lock.
- (void) unlock Description forthcoming.Inherits From: NSUserDefaults: NSObject Declared in: NSUserDefaults.h
NSUserDefaults provides an interface to the
defaults system, which allows an application
access to global and/or application specific
defualts set by the user. A particular instance of
NSUserDefaults, standardUserDefaults, is
provided as a convenience. Most of the information
described below pertains to the
standardUserDefaults. It is unlikely
that you would want to instantiate your own
userDefaults object, since it would not be set
up in the same way as the standardUserDefaults.
Defaults are managed based on domains.
Certain domains, such as
NSGlobalDomain, are persistant. These
domains have defaults that are stored externally.
Other domains are volitale. The defaults in these
domains remain in effect only during the existance
of the application and may in fact be different for
applications running at the same time. When
asking for a default value from
standardUserDefaults, NSUserDefaults
looks through the various domains in a particular
order.
The NSLanguages default value is used to set
up the constants for localization. GNUstep will also
look for the LANGUAGES environment
variable if it is not set in the defaults system.
If it exists, it consists of an array of languages that
the user prefers. At least one of the languages should
have a corresponding localization file (typically
located in the directory of
the GNUstep resources).
As a special extension, on systems that support locales
(e.g. GNU/Linux and Solaris), GNUstep will use
information from the user specified locale, if
the NSLanguages default value is not found.
Typically the locale is specified in the
environment with the LANG
environment variable.
The first change to a persistent domain after a
-synchronize
will cause an NSUserDefaultsDidChangeNotification to
be posted (as will any change caused by reading new
values from disk), so your application can keep
track of changes made to the defaults by other
software.
NB. The GNUstep implementation differs from the Apple
one in that it is thread-safe while Apples (as of
MacOS-X 10.1) is not.
+ (void) resetStandardUserDefaults Resets the shared user defaults object to reflect
the current user ID. Needed by setuid processes which
change the user they are running as.
In
GNUstep you should call
GSSetUserName()
when changing your effective user ID, and that class
will call this function for you.
+ (void) setUserLanguages: (NSArray*) languages Sets the array of user languages
preferences. Places the specified array in the
NSLanguages user default.
+ (NSUserDefaults*) standardUserDefaults Returns the shared defaults object. If it doesn't
exist yet, it's created. The defaults are initialized
for the current user. The search list is guaranteed to
be standard only the first time this method is invoked.
The shared instance is provided as a convenience; other
instances may also be created.
+ (NSArray*) userLanguages Returns the array of user languages preferences.
Uses the NSLanguages user default if
available, otherwise tries to infer setup from
operating system information etc (in particular,
uses the LANGUAGES environment variable).
- (NSArray*) arrayForKey: (NSString*) defaultName Looks up a value for a specified default using
-objectForKey:
and checks that it is an NSArray object. Returns
nil if it is not.
- (BOOL) boolForKey: (NSString*) defaultName Looks up a value for a specified default using
-objectForKey:
and returns its boolean representation.
Returns
NO if it is not a boolean.
The
text 'yes' or 'true' or any non zero numeric value is
considered to be a boolean YES.
Other string values are NO.
NB.
This differs slightly from the documented behavior for
MacOS-X (August 2002) in that the GNUstep version
accepts the string 'TRUE' as equivalent to 'YES'.
- (NSData*) dataForKey: (NSString*) defaultName Looks up a value for a specified default using
-objectForKey:
and checks that it is an NSData object. Returns
nil if it is not.
- (NSDictionary*) dictionaryForKey: (NSString*) defaultName Looks up a value for a specified default using
-objectForKey:
and checks that it is an NSDictionary object. Returns
nil if it is not.
- (NSDictionary*) dictionaryRepresentation Returns a dictionary representing the current state
of the defaults system... this is a merged version of
all the domains in the search list.
- (float) floatForKey: (NSString*) defaultName Looks up a value for a specified default using
-objectForKey:
and checks that it is a float. Returns 0.0 if it is
not.
- (id) init Initializes defaults for current user calling
initWithUser:
- (id) initWithContentsOfFile: (NSString*) path Initializes defaults for the specified
path. Returns an object with an empty
search list.
- (id) initWithUser: (NSString*) userName Initializes defaults for the specified user
calling
-initWithContentsOfFile:
- (int) integerForKey: (NSString*) defaultName Looks up a value for a specified default using
-objectForKey:
and checks that it is an integer. Returns 0 if it is
not.
- (id) objectForKey: (NSString*) defaultName Looks up a value for a specified default using. The
lookup is performed by accessing the domains in the
order given in the search list.
Returns
nil if defaultName cannot be
found.
- (NSDictionary*) persistentDomainForName: (NSString*) domainName Returns the persistent domain specified by
domainName.
- (NSArray*) persistentDomainNames Returns an array listing the name of all the
persistent domains.
- (void) registerDefaults: (NSDictionary*) newVals Merges the contents of the dictionary
newVals into the registration domain.
Registration defaults may be added to or
replaced using this method, but may never be
removed. Thus, setting registration defaults at
any point in your program guarantees that the defaults
will be available thereafter.
- (void) removeObjectForKey: (NSString*) defaultName Removes the default with the specified name from
the application domain.
- (void) removePersistentDomainForName: (NSString*) domainName Removes the persistent domain specified by
domainName from the user defaults.
Causes a NSUserDefaultsDidChangeNotification to be
posted if this is the first change to a
persistent-domain since the last
-synchronize
.
- (void) removeVolatileDomainForName: (NSString*) domainName Removes the volatile domain specified by
domainName from the user defaults.
- (NSMutableArray*) searchList Returns an array listing the domains searched in
order to look up a value in the defaults system. The
order of the names in the array is the order in which
the domains are searched.
- (void) setBool: (BOOL) value forKey: (NSString*) defaultName Sets a boolean value for
defaultName in the application domain.
The boolean value is stored as a
string - either YES or NO.
Calls
-setObject:forKey:
to make the change.
- (void) setFloat: (float) value forKey: (NSString*) defaultName Sets a float value for
defaultName in the application domain.
Calls
-setObject:forKey:
to make the change.
- (void) setInteger: (int) value forKey: (NSString*) defaultName Sets an integer value for
defaultName in the application domain.
Calls
-setObject:forKey:
to make the change.
- (void) setObject: (id) value forKey: (NSString*) defaultName Sets an object value for
defaultName in the application domain.
The defaultName must be a
non-empty string.
The value
must be an instance of one of the
[NSString% unknown entity: nbsp
-propertyList]
classes.
Causes a NSUserDefaultsDidChangeNotification to be
posted if this is the first change to a
persistent-domain since the last
-synchronize
.
- (void) setPersistentDomain: (NSDictionary*) domain forName: (NSString*) domainName Replaces the persistent-domain specified by
domainName with domain... a
dictionary containing keys and defaults values.
Raises an NSInvalidArgumentException if
domainName already exists as a
volatile-domain.
Causes a
NSUserDefaultsDidChangeNotification
to be posted if this is the first change to a
persistent-domain since the last
-synchronize
.
- (void) setSearchList: (NSArray*) newList Sets the list of the domains searched in order to look
up a value in the defaults system. The order of the
names in the array is the order in which the domains
are searched.
On lookup, the first match is
used.
- (void) setVolatileDomain: (NSDictionary*) domain forName: (NSString*) domainName Sets the volatile-domain specified by
domainName to domain... a
dictionary containing keys and defaults values.
Raises an NSInvalidArgumentException if
domainName already exists as either a
volatile-domain or a persistent-domain.
- (NSArray*) stringArrayForKey: (NSString*) defaultName Calls
-arrayForKey:
to get an array value for defaultName and
checks that the array contents are string objects...
if not, returns nil.
- (NSString*) stringForKey: (NSString*) defaultName Looks up a value for a specified default using
-objectForKey:
and checks that it is an NSString. Returns
nil if it is not.
- (BOOL) synchronize Ensures that the in-memory and on-disk
representations of the defaults are in
sync. You may call this yourself, but probably don't
need to since it is invoked at intervals whenever a
runloop is running.
If any persistent domain
is changed by reading new values from disk, an
NSUserDefaultsDidChangeNotification
is posted.
- (NSDictionary*) volatileDomainForName: (NSString*) domainName Returns the volatile domain specified by
domainName.
- (NSArray*) volatileDomainNames Returns an array listing the name of all the
volatile domains.
Inherits From: NSCountedSet: NSMutableSet: NSSet: NSObject Declared in: NSSet.h
The NSCountedSet class is used to maintain a set of
objects where the number of times each object has
been added (wiithout a corresponding removal) is kept
track of.
In GNUstep, extra methods are provided to make use of a
counted set for uniquing objects easier.
- (unsigned int) countForObject: (id) anObject Returns the number of times that an object that is
equal to the specified object (as determined byt the
[-isEqual:]
method) has been added to the set and not removed
from it.
Inherits From: NSPortNameServer: NSObject Declared in: NSPortNameServer.h
Description forthcoming.
+ (id) systemDefaultPortNameServer Description forthcoming.
- (NSPort*) portForName: (NSString*) name Description forthcoming.
- (NSPort*) portForName: (NSString*) name onHost: (NSString*) host Description forthcoming.
- (BOOL) registerPort: (NSPort*) port forName: (NSString*) name Description forthcoming.
- (BOOL) removePortForName: (NSString*) name Description forthcoming.Inherits From: NSCoder: NSObject Declared in: NSCoder.h
Description forthcoming.
- (void) decodeArrayOfObjCType: (const char*) type count: (unsigned) count at: (void*) address Description forthcoming.
- (void*) decodeBytesWithReturnedLength: (unsigned*) l Description forthcoming.
- (NSData*) decodeDataObject Description forthcoming.
- (id) decodeObject Description forthcoming.
- (NSPoint) decodePoint Description forthcoming.
- (id) decodePropertyList Description forthcoming.
- (NSRect) decodeRect Description forthcoming.
- (NSSize) decodeSize Description forthcoming.
- (void) decodeValueOfObjCType: (const char*) type at: (void*) address Description forthcoming.
- (void) decodeValuesOfObjCTypes: (const char*) types Description forthcoming.
- (void) encodeArrayOfObjCType: (const char*) type count: (unsigned) count at: (const void*) array Description forthcoming.
- (void) encodeBycopyObject: (id) anObject Description forthcoming.
- (void) encodeByrefObject: (id) anObject Description forthcoming.
- (void) encodeBytes: (void*) d length: (unsigned) l Description forthcoming.
- (void) encodeConditionalObject: (id) anObject Description forthcoming.
- (void) encodeDataObject: (NSData*) data Description forthcoming.
- (void) encodeObject: (id) anObject Description forthcoming.
- (void) encodePoint: (NSPoint) point Description forthcoming.
- (void) encodePropertyList: (id) plist Description forthcoming.
- (void) encodeRect: (NSRect) rect Description forthcoming.
- (void) encodeRootObject: (id) rootObject Description forthcoming.
- (void) encodeSize: (NSSize) size Description forthcoming.
- (void) encodeValueOfObjCType: (const char*) type at: (const void*) address Description forthcoming.
- (void) encodeValuesOfObjCTypes: (const char*) types Description forthcoming.
- (NSZone*) objectZone Description forthcoming.
- (void) setObjectZone: (NSZone*) zone Description forthcoming.
- (unsigned int) systemVersion Description forthcoming.
- (unsigned int) versionForClassName: (NSString*) className Description forthcoming.Inherits From: GSXMLNode: NSObject Conforms to: NSCopying
Declared in: GSXML.h
Description forthcoming.
+ (NSString*) descriptionFromType: (int) type Description forthcoming.
+ (int) typeFromDescription: (NSString*) desc Description forthcoming.
- (NSDictionary*) attributes Description forthcoming.
- (NSString*) content Description forthcoming.
- (GSXMLDocument*) document Description forthcoming.
- (GSXMLAttribute*) firstAttribute Description forthcoming.
- (GSXMLNode*) firstChild Description forthcoming.
- (GSXMLNode*) firstChildElement Description forthcoming.
- (void*) lib Description forthcoming.
- (GSXMLAttribute*) makeAttributeWithName: (NSString*) name value: (NSString*) value Description forthcoming.
- (GSXMLNode*) makeChildWithNamespace: (GSXMLNamespace*) ns name: (NSString*) name content: (NSString*) content Description forthcoming.
- (GSXMLNode*) makeComment: (NSString*) content Description forthcoming.
- (GSXMLNamespace*) makeNamespaceHref: (NSString*) href prefix: (NSString*) prefix Description forthcoming.
- (GSXMLNode*) makePI: (NSString*) name content: (NSString*) content Description forthcoming.
- (GSXMLNode*) makeText: (NSString*) content Description forthcoming.
- (NSString*) name Description forthcoming.
- (GSXMLNamespace*) namespace Description forthcoming.
- (GSXMLNamespace*) namespaceDefinitions Description forthcoming.
- (GSXMLNode*) next Description forthcoming.
- (GSXMLNode*) nextElement Description forthcoming.
- (NSString*) objectForKey: (NSString*) key Description forthcoming.
- (GSXMLNode*) parent Description forthcoming.
- (GSXMLNode*) previous Description forthcoming.
- (GSXMLNode*) previousElement Description forthcoming.
- (NSMutableDictionary*) propertiesAsDictionaryWithKeyTransformationSel: (SEL) keyTransformSel Description forthcoming.
- (void) setNamespace: (GSXMLNamespace*) space Description forthcoming.
- (void) setObject: (NSString*) value forKey: (NSString*) key Description forthcoming.
- (int) type Description forthcoming.
- (NSString*) typeDescription Description forthcoming.Inherits From: NSInvocation: NSObject Declared in: NSInvocation.h
Description forthcoming.
+ (NSInvocation*) invocationWithMethodSignature: (NSMethodSignature*) _signature Description forthcoming.
- (BOOL) argumentsRetained Description forthcoming.
- (void) getArgument: (void*) buffer atIndex: (int) index Description forthcoming.
- (void) getReturnValue: (void*) buffer Description forthcoming.
- (void) invoke Description forthcoming.
- (void) invokeWithTarget: (id) anObject Description forthcoming.
- (NSMethodSignature*) methodSignature Description forthcoming.
- (void) retainArguments Description forthcoming.
- (SEL) selector Description forthcoming.
- (void) setArgument: (void*) buffer atIndex: (int) index Description forthcoming.
- (void) setReturnValue: (void*) buffer Description forthcoming.
- (void) setSelector: (SEL) aSelector Description forthcoming.
- (void) setTarget: (id) anObject Description forthcoming.
- (id) target Description forthcoming.Inherits From: NSULongNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSDistantObject: NSProxy Conforms to: NSCoding
Declared in: NSDistantObject.h
Description forthcoming.
+ (NSDistantObject*) proxyWithLocal: (id) anObject connection: (NSConnection*) aConnection Description forthcoming.
+ (NSDistantObject*) proxyWithTarget: (unsigned) anObject connection: (NSConnection*) aConnection Description forthcoming.
- (NSConnection*) connectionForProxy Description forthcoming.
- (id) initWithLocal: (id) anObject connection: (NSConnection*) aConnection Description forthcoming.
- (id) initWithTarget: (unsigned) target connection: (NSConnection*) aConnection Description forthcoming.
- (void) setProtocolForProxy: (Protocol*) aProtocol Description forthcoming.Inherits From: NSAttributedString: NSObject Conforms to: NSCodingNSCopyingNSMutableCopying
Declared in: NSAttributedString.h
Description forthcoming.
- (id) attribute: (NSString*) attributeName atIndex: (unsigned int) index effectiveRange: (NSRange*) aRange Description forthcoming.
- (id) attribute: (NSString*) attributeName atIndex: (unsigned int) index longestEffectiveRange: (NSRange*) aRange inRange: (NSRange) rangeLimit Description forthcoming.
- (NSAttributedString*) attributedSubstringFromRange: (NSRange) aRange Description forthcoming.
- (NSAttributedString*) attributedSubstringWithRange: (NSRange) aRange Description forthcoming.
- (NSDictionary*) attributesAtIndex: (unsigned int) index effectiveRange: (NSRange*) aRange Description forthcoming.
- (NSDictionary*) attributesAtIndex: (unsigned int) index longestEffectiveRange: (NSRange*) aRange inRange: (NSRange) rangeLimit Description forthcoming.
- (id) initWithAttributedString: (NSAttributedString*) attributedString Description forthcoming.
- (id) initWithString: (NSString*) aString Description forthcoming.
- (id) initWithString: (NSString*) aString attributes: (NSDictionary*) attributes Description forthcoming.
- (BOOL) isEqualToAttributedString: (NSAttributedString*) otherString Description forthcoming.
- (unsigned int) length Description forthcoming.
- (NSString*) string Description forthcoming.Inherits From: NSDateFormatter: NSFormatter: NSObject Conforms to: NSCodingNSCopying
Declared in: NSDateFormatter.h
Description forthcoming.
- (BOOL) allowsNaturalLanguage Description forthcoming.
- (NSString*) dateFormat Description forthcoming.
- (id) initWithDateFormat: (NSString*) format allowNaturalLanguage: (BOOL) flag Description forthcoming.Inherits From: NSConnection: NSObject Declared in: NSConnection.h
NSConnection objects are used to manage
communications between objects in different
processes, in different machines, or in different
threads.
+ (NSArray*) allConnections Returns an array containing all the NSConnection
objects known to the system. These connections will
be valid at the time that the array was created, but may
be invalidated by other threads before you get to
examine the array.
+ (NSConnection*) connectionWithReceivePort: (NSPort*) r sendPort: (NSPort*) s Returns a connection initialised using
-initWithReceivePort:sendPort:
+ (NSConnection*) connectionWithRegisteredName: (NSString*) n host: (NSString*) h Returns an NSConnection object whose send port is
that of the NSConnection registered under the name
n on the host h
This method calls
+connectionWithRegisteredName:host:usingNameServer: using the default system name server.
+ (NSConnection*) connectionWithRegisteredName: (NSString*) n host: (NSString*) h usingNameServer: (NSPortNameServer*) s Returns an NSConnection object whose send port is
that of the NSConnection registered under
name on host.
The nameserver server is used to look up the
send port to be used for the connection.
If host is nil or an empty
string, the host is taken to be the local
machine. If it is an asterisk ('*') then the
nameserver checks all hosts on the local
subnet (unless the nameserver is one that only
manages local ports). In the GNUstep
implementation, the local host is
searched before any other hosts.
If no NSConnection can be found for name and
host host, the method returns
nil.
The returned object has the default NSConnection of
the current thread as its parent (it has the same
receive port as the default connection).
+ (id) currentConversation Not used in GNUstep
+ (NSConnection*) defaultConnection Returns the default connection for a thread.
Creates a new instance if necessary.
The
default connection has a single NSPort object used
for both sending and receiving - this it can't be used
to connect to a remote process, but can be used to vend
objects.
Possible problem - if the
connection is invalidated, it won't be cleaned
up until this thread calls this method again. The
connection and it's ports could hang around for
a very long time.
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*) n host: (NSString*) h This method calls
+rootProxyForConnectionWithRegisteredName:host:usingNameServer: to return a proxy for a root object on the remote connection with the send port registered under name n on host h.
+ (NSDistantObject*) rootProxyForConnectionWithRegisteredName: (NSString*) n host: (NSString*) h usingNameServer: (NSPortNameServer*) s This method calls
+connectionWithRegisteredName:host:usingNameServer: to get a connection, then sends it a -rootProxy message to get a proxy for the root object being vended by the remote connection. Returns the proxy or nil if it couldn't find a connection or if the root object for the connection has not been set.
- (void) addRequestMode: (NSString*) mode Adds mode to the run loop modes that the
NSConnection will listen to for incoming
messages.
- (void) addRunLoop: (NSRunLoop*) loop Adds loop to the set of run loops that the
NSConnection will listen to for incoming
messages.
- (id) delegate Returns the delegate of the NSConnection.
- (void) enableMultipleThreads Sets the NSConnection configuration so that multiple
threads may use the connection to send requests to
the remote connection.
This option is inherited
by child connections.
NB. A connection with
multiple threads enabled will run slower than a
normal connection.
- (BOOL) independentConversationQueueing Returns YES if the NSConnection is
configured to handle remote messages atomically,
NO otherwise.
This option is
inherited by child connections.
- (id) initWithReceivePort: (NSPort*) r sendPort: (NSPort*) s Initialises an NSConnection with the receive
port r and the send port s.
Behavior varies with the port values as
follows -
If a connection exists whose send and receive ports
are both the same as the new connections receive
port, that existing connection is deemed to be the
parent of the new connection. The new connection
inherits configuration information from the
parent, and the delegate of the parent has a
chance to adjust ythe configuration of the new
connection or veto its creation.
NSConnectionDidInitializeNotification
is posted once a new connection is initialised.
- (void) invalidate Marks the receiving NSConnection as invalid.
Removes the NSConnections ports from any run loops.
Posts an NSConnectionDidDieNotification.
Invalidates all remote objects and local
proxies.
- (BOOL) isValid Returns YES if the connection is
valid, NO otherwise. A connection is
valid until it has been sent an
-invalidate
message.
- (NSArray*) localObjects Returns an array of all the local proxies to
objects that are retained by the remote connection.
- (BOOL) multipleThreadsEnabled Returns YES if the connection permits
multiple threads to use it to send requests,
NO otherwise.
See the
-enableMultipleThreads
method.
- (NSPort*) receivePort Returns the NSPort object on which incoming
messages are recieved.
- (BOOL) registerName: (NSString*) name Simply invokes
-registerName:withNameServer:
passing it the default system nameserver.
- (BOOL) registerName: (NSString*) name withNameServer: (NSPortNameServer*) svr Registers the recieve port of the NSConnection as
name and unregisters the previous value
(if any).
Returns YES on success,
NO on failure.
On failure, the
connection remains registered under the previous
name.
Supply nil as
name to unregister the NSConnection.
- (NSArray*) remoteObjects Returns an array of proxies to all the remote
objects known to the NSConnection.
- (void) removeRequestMode: (NSString*) mode Removes mode from the run loop modes
used to recieve incoming messages.
- (void) removeRunLoop: (NSRunLoop*) loop Removes loop from the run loops used to
recieve incoming messages.
- (NSTimeInterval) replyTimeout Returns the timeout interval used when waiting for
a reply to a request sent on the NSConnection. This value
is inherited from the parent connection or may be set
using the
-setReplyTimeout:
method.
Under MacOS-X the default value is
documented as the maximum delay (effectively
infinite), but under GNUstep it is set to a more
useful 300 seconds.
- (NSArray*) requestModes Returns an array of all the run loop modes that the
NSConnection uses when waiting for an incoming
request.
- (NSTimeInterval) requestTimeout Returns the timeout interval used when trying to
send a request on the NSConnection. This value is
inherited from the parent connection or may be
set using the
-setRequestTimeout:
method.
Under MacOS-X the default value is
documented as the maximum delay (effectively
infinite), but under GNUstep it is set to a more
useful 300 seconds.
- (id) rootObject Returns the object that is made available by this
connection or by its parent (the object is
associated with the receive port).
Returns nil if no root object has been
set.
- (NSDistantObject*) rootProxy Returns the proxy for the root object of the remote
NSConnection.
- (void) runInNewThread Removes the NSConnection from the current threads
default run loop, then creates a new thread and
runs the NSConnection in it.
- (NSPort*) sendPort Returns the port on which the NSConnection sends
messages.
- (void) setDelegate: (id) anObj Sets the NSConnection's delegate (without retaining
it).
The delegate is able to control some of
the NSConnection's behavior by implementing methods in
an informal protocol.
- (void) setIndependentConversationQueueing: (BOOL) flag Sets whether or not the NSConnection should handle
requests arriving from the remote NSConnection
atomically.
By default, this is set to
NO... if set to YES then
any messages arriving while one message is being dealt
with, will be queued.
NB. careful - use of
this option can cause deadlocks.
- (void) setReplyTimeout: (NSTimeInterval) to Sets the time interval that the NSConnection will wait
for a reply for one of its requests before raising an
NSPortTimeoutException.
NB.
In GNUstep you may also get such an exception if the
connection becomes invalidated while waiting for
a reply to a request.
- (void) setRequestMode: (NSString*) mode Sets the runloop mode in which requests
will be sent to the remote end of the connection.
- (void) setRequestTimeout: (NSTimeInterval) to Sets the time interval that the NSConnection will wait
to send one of its requests before raising
an NSPortTimeoutException.
- (void) setRootObject: (id) anObj Sets the root object that is vended by the connection.
- (NSDictionary*) statistics Returns an object containing various statistics for
the NSConnection.
On GNUstep the dictionary
contains -
Inherits From: NSThread: NSObject Declared in: NSThread.h
Description forthcoming.
+ (NSThread*) currentThread Returns the NSThread object corresponding to the
current thread.
NB. In GNUstep the library internals use the
GSCurrentThread()
function as a more efficient mechanism for doing
this job - so you cannot use a category to override
this method and expect the library internals to use
your implementation.
+ (void) detachNewThreadSelector: (SEL) aSelector toTarget: (id) aTarget withObject: (id) anArgument Create a new thread - use this method rather than
alloc-init
+ (void) exit Terminating a thread What happens if the thread
doesn't call
+exit
- it doesn't terminate!
+ (BOOL) isMultiThreaded Returns a flag to say whether the application is
multi-threaded or not. An application is
considered to be multi-threaded if any thread
other than the main thread has been started,
irrespective of whether that thread has since
terminated.
+ (void) setThreadPriority: (double) pri Set the priority of the current thread. This is a value
in the range 0.0 (lowest) to 1.0 (highest) which is
mapped to the underlying system priorities. The
current gnu objc runtime supports three priority
levels which you can obtain using values of 0.0,
0.5, and 1.0
+ (void) sleepUntilDate: (NSDate*) date Delaying a thread... pause until the specified
date.
+ (double) threadPriority Return the priority of the current thread.
- (NSMutableDictionary*) threadDictionary Return the thread dictionary. This dictionary can be
used to store arbitrary thread specific data.
NB. This cannot be autoreleased, since we cannot be
sure that the autorelease pool for the thread will
continue to exist for the entire life of the
thread!
Inherits From: NSSocketPort: NSPort: NSObject Conforms to: NSCodingNSCopying
Declared in: NSPort.h
NSSocketPort on MacOS X(tm) is a
concrete subclass of NSPort which implements
Distributed Objects communication between hosts
on a network. However, the GNUstep distributed objects
system's NSPort class uses TCP/IP for all of its
communication. The GNUstep
NSSocketPort, then, is useful as a
convenient method to create and encapsulate BSD
sockets:
- (NSData*) address Return the protocol family-specific socket address
in an NSData object.
- (id) init Initialize the receiver with a local socket to
accept TCP connections on a non-conflicting port
number chosen by the system.
- (id) initRemoteWithProtocolFamily: (int) family socketType: (int) type protocol: (int) protocol address: (NSData*) addrData Initialize the receiver to connect to a remote
socket of type with
protocol from the
protocolfamilyfamily. The
addrData should contain a copy of
the protocol family-specific address data in
an NSData object.
- (id) initRemoteWithTCPPort: (unsigned short) portNumber host: (NSString*) hostname Initialize the receiver to connect to a remote
TCP socket on port portNumber of
host hostname. The receiver delays
initiation of the connection until it has data
to send.
NOTE: This method currently does not
support IPv6 connections.
- (id) initWithProtocolFamily: (int) family socketType: (int) type protocol: (int) protocol address: (NSData*) addrData Initialize the receiver as a local socket to
accept connections on a socket of
type with the
protocol from the
protocolfamilyfamily. The
addrData should contain a copy of
the protocol family-specific address data in
an NSData object.
- (id) initWithProtocolFamily: (int) family socketType: (int) type protocol: (int) protocol socket: (NSSocketNativeHandle) socket Initialize the receiver with
socket, the platform-native handle
to a previously initialized listen-mode
socket of typetype with the protocolprotocol from the
protocolfamilyfamily.
The receiver will
close the socket upon deallocation.
- (id) initWithTCPPort: (unsigned short) portNumber Initialize the receiver as a local socket to
accept connections on TCP port
portNumber. If
portNumber is zero, the system
will chose a non-conflicting port number.
NOTE:
This method currently does not support IPv6
connections.
- (int) protocol Return the socket protocol.
- (int) protocolFamily Return the socket protocol family.
- (NSSocketNativeHandle) socket Return the platform-native socket handle.
- (int) socketType Return the socket type.
Inherits From: NSDecimalNumber: NSNumber: NSValue: NSObject Conforms to: NSDecimalNumberBehaviors
Declared in: NSDecimalNumber.h
Description forthcoming.
+ (NSDecimalNumber*) decimalNumberWithDecimal: (NSDecimal) decimal Description forthcoming.
+ (NSDecimalNumber*) decimalNumberWithMantissa: (unsigned long long) mantissa exponent: (short) exponent isNegative: (BOOL) isNegative Description forthcoming.
+ (NSDecimalNumber*) decimalNumberWithString: (NSString*) numericString Description forthcoming.
+ (NSDecimalNumber*) decimalNumberWithString: (NSString*) numericString locale: (NSDictionary*) locale Description forthcoming.
+ (id<NSDecimalNumberBehaviors>) defaultBehavior Description forthcoming.
+ (NSDecimalNumber*) maximumDecimalNumber Description forthcoming.
+ (NSDecimalNumber*) minimumDecimalNumber Description forthcoming.
+ (NSDecimalNumber*) notANumber Description forthcoming.
+ (NSDecimalNumber*) one Description forthcoming.
+ (void) setDefaultBehavior: (id<NSDecimalNumberBehaviors>) behavior Description forthcoming.
+ (NSDecimalNumber*) zero Description forthcoming.
- (NSComparisonResult) compare: (NSNumber*) decimalNumber Description forthcoming.
- (NSDecimalNumber*) decimalNumberByAdding: (NSDecimalNumber*) decimalNumber Description forthcoming.
- (NSDecimalNumber*) decimalNumberByAdding: (NSDecimalNumber*) decimalNumber withBehavior: (id<NSDecimalNumberBehaviors>) behavior Description forthcoming.
- (NSDecimalNumber*) decimalNumberByDividingBy: (NSDecimalNumber*) decimalNumber Description forthcoming.
- (NSDecimalNumber*) decimalNumberByDividingBy: (NSDecimalNumber*) decimalNumber withBehavior: (id<NSDecimalNumberBehaviors>) behavior Description forthcoming.
- (NSDecimalNumber*) decimalNumberByMultiplyingBy: (NSDecimalNumber*) decimalNumber Description forthcoming.
- (NSDecimalNumber*) decimalNumberByMultiplyingBy: (NSDecimalNumber*) decimalNumber withBehavior: (id<NSDecimalNumberBehaviors>) behavior Description forthcoming.
- (NSDecimalNumber*) decimalNumberByMultiplyingByPowerOf10: (short) power Description forthcoming.
- (NSDecimalNumber*) decimalNumberByMultiplyingByPowerOf10: (short) power withBehavior: (id<NSDecimalNumberBehaviors>) behavior Description forthcoming.
- (NSDecimalNumber*) decimalNumberByRaisingToPower: (unsigned) power Description forthcoming.
- (NSDecimalNumber*) decimalNumberByRaisingToPower: (unsigned) power withBehavior: (id<NSDecimalNumberBehaviors>) behavior Description forthcoming.
- (NSDecimalNumber*) decimalNumberByRoundingAccordingToBehavior: (id<NSDecimalNumberBehaviors>) behavior Description forthcoming.
- (NSDecimalNumber*) decimalNumberBySubtracting: (NSDecimalNumber*) decimalNumber Description forthcoming.
- (NSDecimalNumber*) decimalNumberBySubtracting: (NSDecimalNumber*) decimalNumber withBehavior: (id<NSDecimalNumberBehaviors>) behavior Description forthcoming.
- (NSDecimal) decimalValue Description forthcoming.
- (NSString*) descriptionWithLocale: (NSDictionary*) locale Description forthcoming.
- (double) doubleValue Description forthcoming.
- (id) initWithDecimal: (NSDecimal) decimal Description forthcoming.
- (id) initWithMantissa: (unsigned long long) mantissa exponent: (short) exponent isNegative: (BOOL) flag Description forthcoming.
- (id) initWithString: (NSString*) numberValue Description forthcoming.
- (id) initWithString: (NSString*) numberValue locale: (NSDictionary*) locale Description forthcoming.
- (const char*) objCType Description forthcoming.Inherits From: NSMutableSet: NSSet: NSObject Declared in: NSSet.h
Description forthcoming.
+ (id) setWithCapacity: (unsigned) numItems Description forthcoming.
- (void) addObject: (id) anObject Adds anObject to the set.
The object
is retained by the set.
- (void) addObjectsFromArray: (NSArray*) array Adds all the objects in the array to the
receiver.
- (id) initWithCapacity: (unsigned) numItems Initialises a newly allocated set to contain no
objects but to have space available to hold the
specified number of items.
Additions of
items to a set initialised with an appropriate
capacity will be more efficient than addition of
items otherwise.
- (void) intersectSet: (NSSet*) other Removes from the receiver all the objects it
contains which are not also in other.
- (void) minusSet: (NSSet*) other Removes from the receiver all the objects that are
in other.
- (void) removeAllObjects Removes all objects from the receiver.
- (void) removeObject: (id) anObject Removes the anObject from the receiver.
- (void) setSet: (NSSet*) other Removes all objects from the receiver then adds the
objects from other. If the receiver
isother, the method has no
effect.
- (void) unionSet: (NSSet*) other Adds all the objects from other to the
receiver.
Inherits From: NSNumber: NSValue: NSObject Conforms to: NSCopyingNSCoding
Declared in: NSValue.h
Description forthcoming.
+ (NSNumber*) numberWithBool: (BOOL) value Description forthcoming.
+ (NSNumber*) numberWithChar: (signed char) value Description forthcoming.
+ (NSNumber*) numberWithDouble: (double) value Description forthcoming.
+ (NSNumber*) numberWithFloat: (float) value Description forthcoming.
+ (NSNumber*) numberWithInt: (signed int) value Description forthcoming.
+ (NSNumber*) numberWithLong: (signed long) value Description forthcoming.
+ (NSNumber*) numberWithLongLong: (signed long long) value Description forthcoming.
+ (NSNumber*) numberWithShort: (signed short) value Description forthcoming.
+ (NSNumber*) numberWithUnsignedChar: (unsigned char) value Description forthcoming.
+ (NSNumber*) numberWithUnsignedInt: (unsigned int) value Description forthcoming.
+ (NSNumber*) numberWithUnsignedLong: (unsigned long) value Description forthcoming.
+ (NSNumber*) numberWithUnsignedLongLong: (unsigned long long) value Description forthcoming.
+ (NSNumber*) numberWithUnsignedShort: (unsigned short) value Description forthcoming.
- (BOOL) boolValue Description forthcoming.
- (signed char) charValue Description forthcoming.
- (NSComparisonResult) compare: (NSNumber*) otherNumber Description forthcoming.
- (NSString*) description Description forthcoming.
- (NSString*) descriptionWithLocale: (NSDictionary*) locale Description forthcoming.
- (double) doubleValue Description forthcoming.
- (float) floatValue Description forthcoming.
- (id) initWithBool: (BOOL) value Description forthcoming.
- (id) initWithChar: (signed char) value Description forthcoming.
- (id) initWithDouble: (double) value Description forthcoming.
- (id) initWithFloat: (float) value Description forthcoming.
- (id) initWithInt: (signed int) value Description forthcoming.
- (id) initWithLong: (signed long) value Description forthcoming.
- (id) initWithLongLong: (signed long long) value Description forthcoming.
- (id) initWithShort: (signed short) value Description forthcoming.
- (id) initWithUnsignedChar: (unsigned char) value Description forthcoming.
- (id) initWithUnsignedInt: (unsigned int) value Description forthcoming.
- (id) initWithUnsignedLong: (unsigned long) value Description forthcoming.
- (id) initWithUnsignedLongLong: (unsigned long long) value Description forthcoming.
- (id) initWithUnsignedShort: (unsigned short) value Description forthcoming.
- (signed int) intValue Description forthcoming.
- (BOOL) isEqualToNumber: (NSNumber*) otherNumber Description forthcoming.
- (signed long long) longLongValue Description forthcoming.
- (signed long) longValue Description forthcoming.
- (signed short) shortValue Description forthcoming.
- (NSString*) stringValue Description forthcoming.
- (unsigned char) unsignedCharValue Description forthcoming.
- (unsigned int) unsignedIntValue Description forthcoming.
- (unsigned long long) unsignedLongLongValue Description forthcoming.
- (unsigned long) unsignedLongValue Description forthcoming.
- (unsigned short) unsignedShortValue Description forthcoming.Inherits From: GSMimeParser: NSObject Declared in: GSMime.h
Description forthcoming.
+ (GSMimeDocument*) documentFromData: (NSData*) mimeData Description forthcoming.
+ (GSMimeParser*) mimeParser Description forthcoming.
- (GSMimeCodingContext*) contextFor: (GSMimeHeader*) info Description forthcoming.
- (NSData*) data Description forthcoming.
- (BOOL) decodeData: (NSData*) sData fromRange: (NSRange) aRange intoData: (NSMutableData*) dData withContext: (GSMimeCodingContext*) con Description forthcoming.
- (void) expectNoHeaders Description forthcoming.
- (BOOL) isComplete Description forthcoming.
- (BOOL) isHttp Description forthcoming.
- (BOOL) isInBody Description forthcoming.
- (BOOL) isInHeaders Description forthcoming.
- (GSMimeDocument*) mimeDocument Description forthcoming.
- (BOOL) parse: (NSData*) d Description forthcoming.
- (BOOL) parseHeader: (NSString*) aHeader Description forthcoming.
- (BOOL) scanHeaderBody: (NSScanner*) scanner into: (GSMimeHeader*) info Description forthcoming.
- (NSString*) scanName: (NSScanner*) scanner Description forthcoming.
- (BOOL) scanPastSpace: (NSScanner*) scanner Description forthcoming.
- (NSString*) scanSpecial: (NSScanner*) scanner Description forthcoming.
- (NSString*) scanToken: (NSScanner*) scanner Description forthcoming.
- (void) setBuggyQuotes: (BOOL) flag Description forthcoming.
- (void) setIsHttp Description forthcoming.Inherits From: NSMutableCharacterSet: NSCharacterSet: NSObject Declared in: NSCharacterSet.h
Description forthcoming.
- (void) addCharactersInRange: (NSRange) aRange Description forthcoming.
- (void) addCharactersInString: (NSString*) aString Description forthcoming.
- (void) formIntersectionWithCharacterSet: (NSCharacterSet*) otherSet Description forthcoming.
- (void) formUnionWithCharacterSet: (NSCharacterSet*) otherSet Description forthcoming.
- (void) invert Description forthcoming.
- (void) removeCharactersInRange: (NSRange) aRange Description forthcoming.
- (void) removeCharactersInString: (NSString*) aString Description forthcoming.Inherits From: GCMutableArray: NSMutableArray: NSArray: NSObject Declared in: GCObject.h
Description forthcoming.Inherits From: GSXPathObject: NSObject Declared in: GSXML.h
XPath queries return a GSXPathObject. GSXPathObject in
itself is an abstract class; there are four types of
completely different GSXPathObject types, listed
below. I'm afraid you need to check the returned type
of each GSXPath query to make sure it's what you meant it
to be.
Inherits From: GSXPathNumber: GSXPathObject: NSObject Declared in: GSXML.h
For XPath queries returning a number.
- (double) doubleValue Description forthcoming.Inherits From: NSAssertionHandler: NSObject Declared in: NSException.h
NSAssertionHandler objects are used to
raise exceptions on behalf of macros implementing
assertions.
Each thread has its own
assertion handler instance.
The macros work together with the assertion handler
object to produce meaningful exception messages
containing the name of the source file, the
position within that file, and the name of the
ObjC method or C function in which the assertion
failed.
The assertion macros are:
NSAssert()
, NSCAssert(),
NSAssert1()
, NSCAssert1(),
NSAssert2()
, NSCAssert2(),
NSAssert3()
, NSCAssert3(),
NSAssert4()
, NSCAssert4(),
NSAssert5()
, NSCAssert5(),
NSParameterAssert()
,
NSCParameterAssert()
+ (NSAssertionHandler*) currentHandler Returns the assertion handler object for the
current thread.
If none exists, creates one
and returns it.
- (void) handleFailureInFunction: (NSString*) functionName file: (NSString*) fileName lineNumber: (int) line description: (NSString*) format Handles an assertion failure by using
NSLogv()
to print an error message built from the supplied
arguments, and then raising an
NSInternalInconsistencyException
- (void) handleFailureInMethod: (SEL) aSelector object: (id) object file: (NSString*) fileName lineNumber: (int) line description: (NSString*) format Handles an assertion failure by using
NSLogv()
to print an error message built from the supplied
arguments, and then raising an
NSInternalInconsistencyException
Inherits From: NSCharNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSConditionLock: NSObject Conforms to: NSLockingGCFinalization
Declared in: NSLock.h
Description forthcoming.
- (int) condition Description forthcoming.
- (id) initWithCondition: (int) value Description forthcoming.
- (void) lock Description forthcoming.
- (BOOL) lockBeforeDate: (NSDate*) limit Description forthcoming.
- (void) lockWhenCondition: (int) value Description forthcoming.
- (BOOL) lockWhenCondition: (int) condition_to_meet beforeDate: (NSDate*) limitDate Description forthcoming.
- (BOOL) tryLock Description forthcoming.
- (BOOL) tryLockWhenCondition: (int) value Description forthcoming.
- (void) unlock Description forthcoming.
- (void) unlockWithCondition: (int) value Description forthcoming.Inherits From: NSProcessInfo: NSObject Declared in: NSProcessInfo.h
Description forthcoming.
+ (NSProcessInfo*) processInfo Returns the shared NSProcessInfo object for the
current process.
- (NSArray*) arguments Returns an array containing the arguments supplied
to start this process. NB. In GNUstep, any arguments of
the form --GNU-Debug=... are not included in
this array... they are part of the debug mechanism,
and are hidden so that setting debug variables will not
effect the normal operation of the program.
- (NSDictionary*) environment Returns a dictionary giving the environment
variables which were provided for the process to
use.
- (NSString*) globallyUniqueString Returns a string which may be used as a globally
unique identifier.
The string contains the
host name, the process ID, a timestamp and a counter.
The first three values identify the process
in which the string is generated, while the fourth
ensures that multiple strings generated within the
same process are unique.
- (NSString*) hostName Returns the name of the machine on which this
process is running.
- (unsigned int) operatingSystem Return a number representing the operating system
type.
The known types are listed in the header
file, but not all of the listed types are actually
implemented... some are present for MacOS-X
compatibility only.
- (NSString*) operatingSystemName Returns the name of the operating system in use.
- (int) processIdentifier Returns the process identifier number which
identifies this process on this machine.
- (NSString*) processName Returns the process name for this process. This may
have been set using the
-setProcessName:
method, or may be the default process name (the
file name of the binary being executed).
- (void) setProcessName: (NSString*) newName Change the name of the current process to
newName.
Inherits From: NSRunLoop: NSObject Conforms to: GCFinalization
Declared in: NSRunLoop.h
Description forthcoming.
+ (NSRunLoop*) currentRunLoop Description forthcoming.
- (void) acceptInputForMode: (NSString*) mode beforeDate: (NSDate*) limit_date Listen to input sources.
If
limit_date is nil or in the
past, then don't wait; just poll inputs and return,
otherwise block until input is available or until
the earliest limit date has passed (whichever comes
first).
If the supplied mode is
nil, uses NSDefaultRunLoopMode.
- (void) addTimer: (NSTimer*) timer forMode: (NSString*) mode Adds a timer to the loop in the specified
mode.
Timers are removed
automatically when they are invalid.
- (NSString*) currentMode Returns the current mode of this runloop. If the
runloop is not running then this method returns
nil.
- (NSDate*) limitDateForMode: (NSString*) mode Fire appropriate timers and determine the earliest
time that anything watched for becomes useless.
- (void) run Description forthcoming.
- (BOOL) runMode: (NSString*) mode beforeDate: (NSDate*) date Calls
-acceptInputForMode:beforeDate:
to run the loop once.
The specified
date may be nil... in which
case the loop runs until the first input or timeout.
If the limit dates for all of mode's input
sources have passed, returns NO
without running the loop, otherwise returns
YES.
- (void) runUntilDate: (NSDate*) date Description forthcoming.Inherits From: NSProtocolChecker: NSObject Declared in: NSProtocolChecker.h
Description forthcoming.
+ (id) protocolCheckerWithTarget: (NSObject*) anObject protocol: (Protocol*) aProtocol Description forthcoming.
- (void) forwardInvocation: (NSInvocation*) anInvocation Description forthcoming.
- (id) initWithTarget: (NSObject*) anObject protocol: (Protocol*) aProtocol Description forthcoming.
- (struct objc_method_description*) methodDescriptionForSelector: (SEL) aSelector Description forthcoming.
- (Protocol*) protocol Description forthcoming.
- (NSObject*) target Description forthcoming.Inherits From: NSTimeZoneDetail: NSTimeZone: NSObject Declared in: NSTimeZone.h
This class serves no useful purpose in GNUstep, and is
provided solely for backward compatibility with the
OpenStep spec. It is missing entirely from MacOS-X.
- (BOOL) isDaylightSavingTimeZone Description forthcoming.
- (NSString*) timeZoneAbbreviation Description forthcoming.
- (int) timeZoneSecondsFromGMT Description forthcoming.Inherits From: UnixFileHandle: NSFileHandle: NSObject Conforms to: RunLoopEventsGCFinalization
Declared in: UnixFileHandle.h
Description forthcoming.
- (void) checkAccept Description forthcoming.
- (void) checkConnect Description forthcoming.
- (void) checkRead Description forthcoming.
- (void) checkWrite Description forthcoming.
- (void) ignoreReadDescriptor Description forthcoming.
- (void) ignoreWriteDescriptor Description forthcoming.
- (id) initAsClientAtAddress: (NSString*) a service: (NSString*) s protocol: (NSString*) p Initialise as a client socket
connection... do this by using
[-initAsClientInBackgroundAtAddress:service:protocol:forModes:] and running the current run loop in NSDefaultRunLoopMode until the connection attempt succeeds, fails, or times out.
- (id) initAsClientInBackgroundAtAddress: (NSString*) a service: (NSString*) s protocol: (NSString*) p forModes: (NSArray*) modes A protocol fo the form 'socks-...' controls socks
operation, overriding defaults and environment
variables.
If it is just 'socks-' it
turns off socks for this fiel handle.
Otherwise, the following text must be the name
of the socks server (optionally followed by :port).
- (id) initAsServerAtAddress: (NSString*) a service: (NSString*) s protocol: (NSString*) p Description forthcoming.
- (id) initForReadingAtPath: (NSString*) path Description forthcoming.
- (id) initForUpdatingAtPath: (NSString*) path Description forthcoming.
- (id) initForWritingAtPath: (NSString*) path Description forthcoming.
- (id) initWithNullDevice Description forthcoming.
- (id) initWithStandardError Description forthcoming.
- (id) initWithStandardInput Description forthcoming.
- (id) initWithStandardOutput Description forthcoming.
- (void) postReadNotification Description forthcoming.
- (void) postWriteNotification Description forthcoming.
- (void) receivedEvent: (void*) data type: (RunLoopEventType) type extra: (void*) extra forMode: (NSString*) mode Description forthcoming.
- (void) setAddr: (struct sockaddr_in*) sin Description forthcoming.
- (void) setNonBlocking: (BOOL) flag Description forthcoming.
- (NSDate*) timedOutEvent: (void*) data type: (RunLoopEventType) type forMode: (NSString*) mode Description forthcoming.
- (BOOL) useCompression Description forthcoming.
- (void) watchReadDescriptorForModes: (NSArray*) modes Description forthcoming.
- (void) watchWriteDescriptor Description forthcoming.Inherits From: NSNull: NSObject Conforms to: NSCodingNSCopying
Declared in: NSNull.h
An object to use as a placeholder - in collections for
instance.
+ (NSNull*) null Return an object that can be used as a placeholder
in a collection. This method always returns the same
object.
Inherits From: GSSAXHandler: NSObject Declared in: GSXML.h
Description forthcoming.
+ (GSSAXHandler*) handler Description forthcoming.
- (void) attribute: (NSString*) name value: (NSString*) value Description forthcoming.
- (void) attributeDecl: (NSString*) nameElement name: (NSString*) name type: (int) type typeDefValue: (int) defType defaultValue: (NSString*) value Description forthcoming.
- (void) cdataBlock: (NSString*) value Description forthcoming.
- (void) characters: (NSString*) name Description forthcoming.
- (void) comment: (NSString*) value Description forthcoming.
- (void) elementDecl: (NSString*) name type: (int) type Description forthcoming.
- (void) endDocument Description forthcoming.
- (void) endElement: (NSString*) elementName Description forthcoming.
- (void) entityDecl: (NSString*) name type: (int) type public: (NSString*) publicId system: (NSString*) systemId content: (NSString*) content Description forthcoming.
- (void) error: (NSString*) e Description forthcoming.
- (void) error: (NSString*) e colNumber: (int) colNumber lineNumber: (int) lineNumber Description forthcoming.
- (BOOL) externalSubset: (NSString*) name externalID: (NSString*) externalID systemID: (NSString*) systemID Description forthcoming.
- (void) fatalError: (NSString*) e Description forthcoming.
- (void) fatalError: (NSString*) e colNumber: (int) colNumber lineNumber: (int) lineNumber Description forthcoming.
- (void*) getEntity: (NSString*) name Description forthcoming.
- (void*) getParameterEntity: (NSString*) name Description forthcoming.
- (void) globalNamespace: (NSString*) name href: (NSString*) href prefix: (NSString*) prefix Description forthcoming.
- (int) hasExternalSubset Description forthcoming.
- (int) hasInternalSubset Description forthcoming.
- (void) ignoreWhitespace: (NSString*) ch Description forthcoming.
- (BOOL) internalSubset: (NSString*) name externalID: (NSString*) externalID systemID: (NSString*) systemID Description forthcoming.
- (int) isStandalone Description forthcoming.
- (void*) lib Description forthcoming.
- (NSString*) loadEntity: (NSString*) publicId at: (NSString*) location Description forthcoming.
- (void) namespaceDecl: (NSString*) name href: (NSString*) href prefix: (NSString*) prefix Description forthcoming.
- (void) notationDecl: (NSString*) name public: (NSString*) publicId system: (NSString*) systemId Description forthcoming.
- (GSXMLParser*) parser Description forthcoming.
- (void) processInstruction: (NSString*) targetName data: (NSString*) PIdata Description forthcoming.
- (void) reference: (NSString*) name Description forthcoming.
- (void) startDocument Description forthcoming.
- (void) startElement: (NSString*) elementName attributes: (NSMutableDictionary*) elementAttributes Description forthcoming.
- (void) unparsedEntityDecl: (NSString*) name public: (NSString*) publicId system: (NSString*) systemId notationName: (NSString*) notation Description forthcoming.
- (void) warning: (NSString*) e Description forthcoming.
- (void) warning: (NSString*) e colNumber: (int) colNumber lineNumber: (int) lineNumber Description forthcoming.Inherits From: GSXMLAttribute: GSXMLNode: NSObject Declared in: GSXML.h
Description forthcoming.
- (NSString*) value Description forthcoming.Inherits From: NSException: NSObject Conforms to: NSCodingNSCopying
Declared in: NSException.h
The NSException class helps manage errors in a program.
It provides a mechanism for lower-level methods to
provide information about problems to higher-level
methods, which more often than not, have a better
ability to decide what to do about the problems.
Exceptions are typically handled by enclosing a
sensitive section of code inside the macros
NS_DURING and NS_HANDLER, and then handling any
problems after this, up to the NS_ENDHANDLER
macro:
The local variable localException is the name of the
exception object you can use in the NS_HANDLER
section. The easiest way to cause an exeption is
using the
+raise:format:,...
method.
+ (NSException*) exceptionWithName: (NSString*) name reason: (NSString*) reason userInfo: (NSDictionary*) userInfo Create an an exception object with a name
, reason and a dictionary userInfo
which can be used to provide additional information
or access to objects needed to handle the exception.
After the exception is created you must
-raise
it.
+ (void) raise: (NSString*) name format: (NSString*) format Creates an exception with a name and a
reason using the format string and any
additional arguments. The exception is then
raised.
+ (void) raise: (NSString*) name format: (NSString*) format arguments: (va_list) argList Creates an exception with a name and a
reason string using the format string and
additional arguments specified as a variable
argument list argList. The exception is
then raised.
- (id) initWithName: (NSString*) name reason: (NSString*) reason userInfo: (NSDictionary*) userInfo Initializes a newly allocated NSException
object with a name, reason and
a dictionary userInfo.
- (NSString*) name Returns the name of the exception
- (void) raise Raises the exception. All code following the raise
will not be executed and program control will be
transfered to the closest calling method which
encapsulates the exception code in an
NS_DURING macro, or to the uncaught exception
handler if there is no other handling code.
- (NSString*) reason Returns the exception reason
- (NSDictionary*) userInfo Returns the exception userInfo dictionary
Inherits From: NSArray: NSObject Conforms to: NSCodingNSCopyingNSMutableCopying
Declared in: NSArray.h
A simple, low overhead, ordered container for objects.
+ (id) array Returns an empty autoreleased array.
+ (id) arrayWithArray: (NSArray*) array Returns a new autoreleased NSArray instance
containing all the objects from array
, in the same order as the original.
+ (id) arrayWithContentsOfFile: (NSString*) file Returns an autoreleased array based upon the
file. The new array is created using
+allocWithZone:
and initialised using the
-initWithContentsOfFile:
method. See the documentation for those methods for
more detail.
+ (id) arrayWithObject: (id) anObject Returns an autoreleased array containing
anObject.
+ (id) arrayWithObjects: (id) firstObject Returns an autoreleased array containing the list
of objects, preserving order.
+ (id) arrayWithObjects: (id*) objects count: (unsigned) count Returns an autoreleased array containing the
specified objects, preserving order.
- (NSArray*) arrayByAddingObject: (id) anObject Returns an autoreleased array formed from the
contents of the receiver and adding
anObject as the last item.
- (NSArray*) arrayByAddingObjectsFromArray: (NSArray*) anotherArray Returns a new array which is the concatenation of
self and otherArray (in this precise order).
- (NSString*) componentsJoinedByString: (NSString*) separator Returns a string formed by concatenating the
objects in the receiver, with the specified
separator string inserted between each
part.
- (BOOL) containsObject: (id) anObject Returns YES if anObject
belongs to self. No otherwise.
The
-isEqual:
method of anObject is used to test for
equality.
- (unsigned) count Returns the number of elements contained in the
receiver.
- (NSString*) description Returns the result of invoking
-descriptionWithLocale:indent:
with a nil locale and zero indent.
- (NSString*) descriptionWithLocale: (NSDictionary*) locale Returns the result of invoking
-descriptionWithLocale:indent:
with a zero indent.
- (NSString*) descriptionWithLocale: (NSDictionary*) locale indent: (unsigned int) level Returns the receiver as a text property list in the
traditional format.
See
[NSString% unknown entity: nbsp
-propertyList]
for details.
If locale is
nil, no formatting is done, otherwise
entries are formatted according to the
locale, and indented according to
level.
Unless locale is
nil, a level of zero indents
items by four spaces, while a level of one
indents them by a tab.
The items in the
property list string appear in the same order as
they appear in the receiver.
- (id) firstObjectCommonWithArray: (NSArray*) otherArray Returns the first object found in the receiver
(starting at index 0) which is present in the
otherArray as determined by using the
-containsObject:
method.
- (void) getObjects: (id*) aBuffer Copies the objects from the receiver to
aBuffer, which must be an area of memory
large enough to hold them.
- (void) getObjects: (id*) aBuffer range: (NSRange) aRange Copies the objects from the range aRange
of the receiver to aBuffer, which must be an
area of memory large enough to hold them.
- (unsigned) indexOfObject: (id) anObject Returns the index of the first object found in the
receiver which is equal to anObject
(using anObject's
-isEqual:
method). Returns NSNotFound on failure.
- (unsigned) indexOfObject: (id) anObject inRange: (NSRange) aRange Returns the index of the first object found in
aRange of receiver which is equal to
anObject (using anObject's
-isEqual:
method). Returns NSNotFound on failure.
- (unsigned) indexOfObjectIdenticalTo: (id) anObject Returns the index of the specified object in the
receiver, or NSNotFound if the object is not
present.
- (unsigned) indexOfObjectIdenticalTo: (id) anObject inRange: (NSRange) aRange Returns the index of the specified object in the
range of the receiver, or NSNotFound if the object is
not present.
- (id) initWithArray: (NSArray*) array Initialize the receiver with the contents of
array. The order of array is
preserved.
Invokes
-initWithObjects:count:
- (id) initWithArray: (NSArray*) array copyItems: (BOOL) shouldCopy Initialize the receiver with the contents of
array. The order of array is
preserved.
If shouldCopy is
YES then the objects are copied rather
than simply retained.
Invokes
-initWithObjects:count:
- (id) initWithContentsOfFile: (NSString*) file Initialises the array with the contents of
the specified file, which must contain an
array in property-list format.
In GNUstep, the property-list format may be either the
OpenStep format (ASCII data), or the MacOS-X
format (URF8 XML data)... this method will
recognise which it is.
If there is a failure to load the file for
any reason, the receiver will be released, the method
will return nil, and a warning may be
logged.
Works by invoking
[NSString% unknown entity: nbsp
-initWithContentsOfFile:] and [NSString% unknown entity: nbsp
-propertyList] then checking that the result is an array.
- (id) initWithObjects: (id) firstObject Initialize the array the list of objects.
May change the value of self before returning it.
- (id) initWithObjects: (id*) objects count: (unsigned) count Initialize the array with countobjects.
Retains each object placed
in the array.
Like all initializers, may change
the value of self before returning it.
- (BOOL) isEqualToArray: (NSArray*) otherArray Returns YES if the receiver is equal
to otherArray, NO otherwise.
- (id) lastObject Returns the last object in the receiver, or
nil if the receiver is empty.
- (void) makeObjectsPerform: (SEL) aSelector Obsolete version of
-makeObjectsPerformSelector:
- (void) makeObjectsPerform: (SEL) aSelector withObject: (id) argument Obsolete version of
-makeObjectsPerformSelector:withObject:
- (void) makeObjectsPerformSelector: (SEL) aSelector Makes each object in the array perform
aSelector.
This is done
sequentially from the last to the first
object.
- (void) makeObjectsPerformSelector: (SEL) aSelector withObject: (id) arg Makes each object in the array perform
aSelector with arg.
This
is done sequentially from the last to the first object.
- (id) objectAtIndex: (unsigned) index Returns the object at the specified
index. Raises an exception of the
index is beyond the array.
- (NSEnumerator*) objectEnumerator Returns an enumerator describing the array
sequentially from the first to the last
element.
If you use a mutable subclass of
NSArray, you should not modify the array during
enumeration.
- (NSArray*) pathsMatchingExtensions: (NSArray*) extensions Assumes that the receiver is an array of paths, and
returns an array formed by selecting the subset of
those patch matching the specified array of
extensions.
- (NSEnumerator*) reverseObjectEnumerator Returns an enumerator describing the array
sequentially from the last to the first
element.
If you use a mutable subclass of
NSArray, you should not modify the array during
enumeration.
- (NSData*) sortedArrayHint Subclasses may provide a hint for sorting... The
default GNUstep implementation just returns
nil.
- (NSArray*) sortedArrayUsingFunction: (int(*)(id,id,void*)) comparator context: (void*) context Returns an autoreleased array in which the objects
are ordered according to a sort with
comparator. This invokes
-sortedArrayUsingFunction:context:hint: with a nil hint.
- (NSArray*) sortedArrayUsingFunction: (int(*)(id,id,void*)) comparator context: (void*) context hint: (NSData*) hint Returns an autoreleased array in which the objects
are ordered according to a sort with
comparator, where the
comparator function is passed two objects
to compare, and the copntext as the third argument.
- (NSArray*) sortedArrayUsingSelector: (SEL) comparator Returns an autoreleased array in which the objects
are ordered according to a sort with
comparator.
- (NSArray*) subarrayWithRange: (NSRange) aRange Returns a subarray of the receiver containing the
objects found in the specified range
aRange.
- (BOOL) writeToFile: (NSString*) path atomically: (BOOL) useAuxiliaryFile Writes the contents of the array to the file
specified by path. The file contents
will be in property-list format... under GNUstep
this is either OpenStep style (ASCII characters
using \U hexadecimal escape sequences for unicode),
or MacOS-X style (XML in the UTF8 character set).
If the useAuxiliaryFile flag is
YES, the file write operation is
atomic... the data is written to a temporary file,
which is then renamed to the actual file name.
If the conversion of data into the correct
property-list format fails or the write
operation fails, the method returns
NO, otherwise it returns
YES.
NB. The fact that the file is in property-list format
does not necessarily mean that it can be used to
reconstruct the array using the
-initWithContentsOfFile:
method. If the original array contains
non-property-list objects, the
descriptions of those objects will have been
written, and reading in the file as a
property-list will result in a new array
containing the string descriptions.
- (BOOL) writeToURL: (NSURL*) url atomically: (BOOL) useAuxiliaryFile Writes the contents of the array to the specified
url. This functions just like
-writeToFile:atomically:
except that the output may be written to any URL,
not just a local file.
Inherits From: NSBundle: NSObject Declared in: NSBundle.h
NSBundle provides methods for locating and
handling application (and tool) resources at
runtime. Resources includes any time of file that
the application might need, such as images, nib (gorm
or gmodel) files, localization files, and any other type
of file that an application might need to use to
function. Resources also include executable code,
which can be dynamically linked into the application
at runtime. These files and executable code are commonly
put together into a directory called a bundle.
NSBundle knows how these bundles are organized and
can search for files inside a bundle. NSBundle also
handles locating the executable code, linking this
in and initializing any classes that are located in the
code. NSBundle also handles Frameworks, which are
basically a bundle that contains a library
archive. The organization of a framework is a
little difference, but in most respects there is no
difference between a bundle and a framework.
There is one special bundle, called the mainBundle,
which is basically the application itself. The
mainBundle is always loaded (of course), but you
can still perform other operations on the mainBundle,
such as searching for files, just as with any other
bundle.
+ (NSArray*) allBundles Return an array enumerating all the bundles in the
application. This does not include frameworks.
+ (NSArray*) allFrameworks Return an array enumerating all the frameworks in
the application. This does not include normal bundles.
+ (NSBundle*) bundleForClass: (Class) aClass Return the bundle to which aClass
belongs. If aClass was loaded from a
bundle, return the bundle; if it belongs to a
framework (either a framework linked into the
application, or loaded dynamically), return
the framework; in all other cases, return the main
bundle.
Please note that GNUstep supports plain shared
libraries, while the openstep standard, and
other openstep-like systems, do not; the behaviour
when aClass belongs to a plain shared
library is at the moment still under
investigation -- you should consider it
undefined since it might be changed. :-)
+ (NSBundle*) bundleWithPath: (NSString*) path Return a bundle for the path at
path. If path doesn't exist or
is not readable, return nil. If you want
the main bundle of an application or a tool, it's
better if you use
+mainBundle
.
+ (NSBundle*) mainBundle Return the bundle containing the resources for the
executable. If the executable is an
application, this is the main application
bundle (the xxx.app directory); if the executable
is a tool, this is a bundle 'naturally' associated
with the tool: if the tool executable is
xxx/Tools/ix86/linux-gnu/gnu-gnu-gnu/Control
then the tool's main bundle directory is
xxx/Tools/Resources/Control.
NB: traditionally tools didn't have a main bundle --
this is a recent GNUstep extension, but it's quite
nice and it's here to stay.
The main bundle is where the application should put
all of its resources, such as support files (images,
html, rtf, txt,...), localization tables,.gorm
(.nib) files, etc. gnustep-make (/ProjectCenter)
allows you to easily specify the resource files to
put in the main bundle when you create an application
or a tool.
+ (NSString*) pathForResource: (NSString*) name ofType: (NSString*) ext inDirectory: (NSString*) bundlePath Returns an absolute path for a resource
name with the extension ext in
the specified bundlePath. See also
-pathForResource:ofType:inDirectory: for more information on searching a bundle.
+ (NSString*) pathForResource: (NSString*) name ofType: (NSString*) ext inDirectory: (NSString*) bundlePath withVersion: (int) version This method has been depreciated. Version numbers were
never implemented so this method behaves exactly like
+pathForResource:ofType:inDirectory:.
+ (NSArray*) pathsForResourcesOfType: (NSString*) extension inDirectory: (NSString*) bundlePath Description forthcoming.
+ (NSArray*) preferredLocalizationsFromArray: (NSArray*) localizationsArray Description forthcoming.
+ (NSArray*) preferredLocalizationsFromArray: (NSArray*) localizationsArray forPreferences: (NSArray*) preferencesArray Description forthcoming.
- (NSString*) bundlePath Return the path to the bundle - an absolute path.
- (unsigned) bundleVersion Returns the bundle version.
- (Class) classNamed: (NSString*) className Returns the class in the bundle with the given
name. If no class of this name exists in the bundle,
then Nil is returned.
- (NSString*) executablePath Returns the path to the executable code in the
bundle
- (NSDictionary*) infoDictionary Returns the info property list associated with the
bundle.
- (id) initWithPath: (NSString*) path Init the bundle for reading resources from
path. path must be an absolute
path to a directory on disk. If
path is nil or doesn't exist,
initWithPath: returns nil. If a
bundle for that path already existed, it
is returned in place of the receiver (and the receiver
is deallocated).
- (BOOL) isLoaded Returns YES if the receiver's code is
loaded, otherwise, returns NO.
- (BOOL) load Loads any executable code contained in the bundle
into the application. Load will be called implicitly
if any information about the bundle classes is
requested, such as
-principalClass
or
-classNamed:
.
- (NSArray*) localizations Returns all the localizations in the bundle.
- (NSDictionary*) localizedInfoDictionary Returns a localized info property list based on the
preferred localization or the most appropriate
localization if the preferred one cannot be
found.
- (NSString*) localizedStringForKey: (NSString*) key value: (NSString*) value table: (NSString*) tableName Returns the value for the key
found in the strings file tableName, or
Localizable.strings if
tableName is nil.
- (NSString*) pathForResource: (NSString*) name ofType: (NSString*) ext Returns an absolute path for a resource
name with the extension ext in
the receivers bundle path. See
-pathForResource:ofType:inDirectory:.
- (NSString*) pathForResource: (NSString*) name ofType: (NSString*) ext inDirectory: (NSString*) bundlePath Returns an absolute path for a resource
name with the extension ext
in the specified bundlePath. Directories in
the bundle are searched in the following order:
where lanuage.lproj can be any localized language
directory inside the bundle.
If ext is nil or empty, then
the first file with name and any extension
is returned.
- (NSString*) pathForResource: (NSString*) name ofType: (NSString*) ext inDirectory: (NSString*) bundlePath forLocalization: (NSString*) localizationName Description forthcoming.
- (NSArray*) pathsForResourcesOfType: (NSString*) extension inDirectory: (NSString*) bundlePath Returns an array of paths for all resources with
the specified extension and residing in
the bundlePath directory. If
extension is nil or empty,
all bundle resources are returned.
- (NSArray*) pathsForResourcesOfType: (NSString*) extension inDirectory: (NSString*) bundlePath forLocalization: (NSString*) localizationName Description forthcoming.
- (NSArray*) preferredLocalizations Returns the list of localizations that the bundle
uses to search for information. This is based on the
user's preferences.
- (Class) principalClass Returns the principal class of the bundle. This is
the class specified by the NSPrincipalClass key in the
Info-gnustep property list contained in the
bundle. If this key is not found, the class
returned is arbitrary, although it is typically
the first class compiled into the archive.
- (NSString*) resourcePath Returns the absolute path to the resources
directory of the bundle.
- (void) setBundleVersion: (unsigned) version Set the bundle versionInherits From: NSMutableArray: NSArray: NSObject Declared in: NSArray.h
Description forthcoming.
+ (id) arrayWithCapacity: (unsigned) numItems Creates an autoreleased mutable array anble to
store at least numItems. See the
-initWithCapacity:
method.
- (void) addObject: (id) anObject Adds anObject at the end of the array, thus
increasing the size of the array. The object is
retained upon addition.
- (void) addObjectsFromArray: (NSArray*) otherArray Adds each object from otherArray to the
receiver, in first to last order.
- (void) exchangeObjectAtIndex: (unsigned int) i1 withObjectAtIndex: (unsigned int) i2 Swaps the positions of two objects in the array.
Raises an exception if either array index is out of
bounds.
- (id) initWithCapacity: (unsigned) numItems Initialise the array with the specified capacity
... this should ensure that the array can have
numItems added efficiently.
- (void) insertObject: (id) anObject atIndex: (unsigned) index Inserts an object into the receiver at the
specified location.
Raises an exception if
given an array index which is too large.
The size of the array increases by one.
The object is retained by the array.
- (void) removeAllObjects Removes all objects from the receiver, leaving an
empty array.
- (void) removeLastObject Removes the last object in the array. Raises an
exception if the array is already empty.
- (void) removeObject: (id) anObject Removes all occurrances of anObject
(found by anObjects
-isEqual:
method) from the receiver.
- (void) removeObject: (id) anObject inRange: (NSRange) aRange Removes all occurrances of anObject
(found by the
-isEqual:
method of anObject) aRange in
the receiver.
- (void) removeObjectAtIndex: (unsigned) index Removes an object from the receiver at the
specified location.
The size of the array
decreases by one.
Raises an exception if
given an array index which is too large.
- (void) removeObjectIdenticalTo: (id) anObject Removes all occurrances of anObject
(found by pointer equality) from the receiver.
- (void) removeObjectIdenticalTo: (id) anObject inRange: (NSRange) aRange Removes all occurrances of anObject
(found by pointer equality) from aRange
in the receiver.
- (void) removeObjectsFromIndices: (unsigned*) indices numIndices: (unsigned) count Supplied with a C array of indices
containing count values, this method
removes all corresponding objects from the
receiver. The objects are removed in such a way
that the removal is safe irrespective of the
order in which they are specified in the
indices array.
- (void) removeObjectsInArray: (NSArray*) otherArray Removes from the receiver, all the objects present
in otherArray, as determined by using the
-isEqual:
method.
- (void) removeObjectsInRange: (NSRange) aRange Removes all the objects in aRange from
the receiver.
- (void) replaceObjectAtIndex: (unsigned) index withObject: (id) anObject Places an object into the receiver at the specified
location.
Raises an exception if given an
array index which is too large.
The
object is retained by the array.
- (void) replaceObjectsInRange: (NSRange) aRange withObjectsFromArray: (NSArray*) anArray Replaces objects in the receiver with those from
anArray.
Raises an exception if
given a range extending beyond the array.
- (void) replaceObjectsInRange: (NSRange) aRange withObjectsFromArray: (NSArray*) anArray range: (NSRange) anotherRange Replaces objects in the receiver with some of
those from anArray.
Raises an
exception if given a range extending beyond the
array.
- (void) setArray: (NSArray*) otherArray Sets the contents of the receiver to be identical to
the contents of othrArray.
- (void) sortUsingFunction: (int(*)(id,id,void*)) compare context: (void*) context Sorts the array according to the supplied
compare function with the
context information.
- (void) sortUsingSelector: (SEL) comparator Sorts the array according to the supplied
comparator.
Inherits From: NSLongLongNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: NSMutableString: NSString: NSObject Declared in: NSString.h
This is the mutable form of the NSString class.
+ (id) string Description forthcoming.
+ (id) stringWithCString: (const char*) byteString Description forthcoming.
+ (id) stringWithCString: (const char*) byteString length: (unsigned int) length Description forthcoming.
+ (NSMutableString*) stringWithCapacity: (unsigned int) capacity Description forthcoming.
+ (id) stringWithCharacters: (const unichar*) characters length: (unsigned int) length Description forthcoming.
+ (id) stringWithContentsOfFile: (NSString*) path Description forthcoming.
+ (id) stringWithFormat: (NSString*) format Description forthcoming.
- (void) appendFormat: (NSString*) format Description forthcoming.
- (void) appendString: (NSString*) aString Description forthcoming.
- (void) deleteCharactersInRange: (NSRange) range Description forthcoming.
- (id) initWithCapacity: (unsigned int) capacity Description forthcoming.
- (void) insertString: (NSString*) aString atIndex: (unsigned int) loc Description forthcoming.
- (void) replaceCharactersInRange: (NSRange) range withString: (NSString*) aString Description forthcoming.
- (unsigned int) replaceOccurrencesOfString: (NSString*) replace withString: (NSString*) by options: (unsigned int) opts range: (NSRange) searchRange Replaces all occurrences of the replace
string with the by string, for those
cases where the entire replace string lies
within the specified searchRange value.
The value of opts determines the
direction of the search is and whether only
leading/trailing occurrances (anchored
search) of replace are substituted.
Raises NSInvalidArgumentException if either
string argument is nil.
Raises
NSRangeException if part of
searchRange is beyond the end of the
receiver.
- (void) setString: (NSString*) aString Description forthcoming.Inherits From: GSHTMLParser: GSXMLParser: NSObject Declared in: GSXML.h
Description forthcoming.Inherits From: NSClassDescription: NSObject Declared in: NSClassDescription.h
Description forthcoming.
+ (NSClassDescription*) classDescriptionForClass: (Class) aClass Returns the class descriptuion for
aClass. If there is no such description
available, sends an
NSClassDescriptionNeededForClassNotification
(with aClass as its object) so that
objects providing class descriptions can register
one, and tries again to find one.
Returns
nil if there is no description found.
Handles locking to ensure thread safety and
ensures that the returned object will not be
destroyed by other threads.
+ (void) invalidateClassDescriptionCache Invalidates the cache of class descriptions so
the new descriptions will be fetched as required and
begin to refil the cache. You need this only if you
suspect that a class description should have
changed.
+ (void) registerClassDescription: (NSClassDescription*) aDescription forClass: (Class) aClass Registers aDescription for
aClass... placing it in the cache and
replacing any previous version.
- (NSArray*) attributeKeys Returns the attribute keys - default implementation
returns nil.
- (NSString*) inverseForRelationshipKey: (NSString*) aKey Returns the inverse relationship keys - default
implementation returns nil.
- (NSArray*) toManyRelationshipKeys Returns the to many relationship keys - default
implementation returns nil.
- (NSArray*) toOneRelationshipKeys Returns the to one relationship keys - default
implementation returns nil.
Inherits From: NSMutableDictionary: NSDictionary: NSObject Declared in: NSDictionary.h
Description forthcoming.
+ (id) dictionaryWithCapacity: (unsigned) numItems Description forthcoming.
- (void) addEntriesFromDictionary: (NSDictionary*) otherDictionary Merges information from otherDictionary
into the receiver. If a key exists in both
dictionaries, the value from
otherDictionary replaces that which was
originally in the reciever.
- (id) initWithCapacity: (unsigned) numItems Description forthcoming.
- (void) removeAllObjects Description forthcoming.
- (void) removeObjectForKey: (id) aKey Description forthcoming.
- (void) removeObjectsForKeys: (NSArray*) keyArray Description forthcoming.
- (void) setDictionary: (NSDictionary*) otherDictionary Description forthcoming.
- (void) setObject: (id) anObject forKey: (id) aKey Description forthcoming.
- (void) takeStoredValue: (id) value forKey: (NSString*) key Default implementation for this class is equivalent
to the
-setObject:forKey:
method unless value is nil,
in which case it is equivalent to
-removeObjectForKey:
- (void) takeValue: (id) value forKey: (NSString*) key Default implementation for this class is equivalent
to the
-setObject:forKey:
method unless value is nil,
in which case it is equivalent to
-removeObjectForKey:
Inherits From: NSLongNumber: NSNumber: NSValue: NSObject Declared in: NSConcreteNumber.h
Description forthcoming.Inherits From: GSXPathBoolean: GSXPathObject: NSObject Declared in: GSXML.h
For XPath queries returning true/false.
- (BOOL) booleanValue Description forthcoming.