Up

GSCategories autogsdoc generated documentation

Authors

Richard Frith-Macdonald (rfm@gnu.org)

Copyright: (C) 2003 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSArray(GSCompatibility) category
  2. Software documentation for the NSBundle(GSCompatibility) category
  3. Software documentation for the NSCalendarDate(GSCategories) category
  4. Software documentation for the NSData(GSCategories) category
  5. Software documentation for the NSDistantObject(GSCompatibility) category
  6. Software documentation for the NSFileHandle(GSCompatibility) category
  7. Software documentation for the NSInvocation(GSCompatibility) category
  8. Software documentation for the NSLock(GSCategories) category
  9. Software documentation for the NSMutableString(GSCategories) category
  10. Software documentation for the NSNumber(GSCategories) category
  11. Software documentation for the NSObject(GSCategories) category
  12. Software documentation for the NSObject(GSCompatibility) informal protocol
  13. Software documentation for the NSProcessInfo(GSCompatibility) category
  14. Software documentation for the NSRecursiveLock(GSCategories) category
  15. Software documentation for the NSString(GSCategories) category
  16. Software documentation for the NSString(GSCompatibility) category

Software documentation for the NSArray(GSCompatibility) category

NSArray(GSCompatibility)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

initWithArray:copyItems:

- (id) initWithArray: (NSArray*)array copyItems: (BOOL)shouldCopy;

Description forthcoming.


Software documentation for the NSBundle(GSCompatibility) category

NSBundle(GSCompatibility)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

pathForLibraryResource:ofType:inDirectory:

+ (NSString*) pathForLibraryResource: (NSString*)name ofType: (NSString*)ext inDirectory: (NSString*)bundlePath;

Description forthcoming.


Software documentation for the NSCalendarDate(GSCategories) category

NSCalendarDate(GSCategories)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Extension methods for the NSCalendarDate class

Method summary

weekOfYear

- (int) weekOfYear;

The ISO standard week of the year is based on the first week of the year being that week (starting on monday) for which the thursday is on or after the first of january.
This has the effect that, if january first is a friday, saturday or sunday, the days of that week (up to and including the sunday) are considered to be in week 53 of the preceeding year. Similarly if the last day of the year is a monday tuesday or wednesday, these days are part of week 1 of the next year.


Software documentation for the NSData(GSCategories) category

NSData(GSCategories)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Extension methods for the NSData class

Method summary

hexadecimalRepresentation

- (NSString*) hexadecimalRepresentation;

Returns an NSString object containing an ASCII hexadecimal representation of the receiver. This means that the returned object will contain exactly twice as many characters as there are bytes as the receiver, as each byte in the receiver is represented by two hexadecimal digits.
The high order four bits of each byte is encoded before the low order four bits. Capital letters 'A' to 'F' are used to represent values from 10 to 15.
If you need the hexadecimal representation as raw byte data, use code like -

   hexData = [[sourceData hexadecimalRepresentation]
     dataUsingEncoding: NSASCIIStringEncoding];
 


initWithHexadecimalRepresentation:

- (id) initWithHexadecimalRepresentation: (NSString*)string;

Initialises the receiver with the supplied string data which contains a hexadecimal coding of the bytes. The parsing of the string is fairly tolerant, ignoring whitespace and permitting both upper and lower case hexadecimal digits (the -hexadecimalRepresentation method produces a string using only uppercase digits with no white spaqce).
If the string does not contain one or more pairs of hexadecimal digits then an exception is raised.


md5Digest

- (NSData*) md5Digest;

Creates an MD5 digest of the information stored in the receiver and returns it as an autoreleased 16 byte NSData object.
If you need to produce a digest of string information, you need to decide what character encoding is to be used and convert your string to a data object of that encoding type first using the [NSString -dataUsingEncoding:] method -

   myDigest = [[myString dataUsingEncoding: NSUTF8StringEncoding] md5Digest];
 
If you need to use the digest in a human readable form, you will probably want it to be seen as 32 hexadecimal digits, and can do that using the -hexadecimalRepresentation method.


Software documentation for the NSDistantObject(GSCompatibility) category

NSDistantObject(GSCompatibility)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

setDebug:

+ (void) setDebug: (int)val;

Description forthcoming.


Software documentation for the NSFileHandle(GSCompatibility) category

NSFileHandle(GSCompatibility)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

fileHandleAsServerAtAddress:service:protocol:

+ (id) fileHandleAsServerAtAddress: (NSString*)address service: (NSString*)service protocol: (NSString*)protocol;

Description forthcoming.


socketAddress

- (NSString*) socketAddress;

Description forthcoming.


Software documentation for the NSInvocation(GSCompatibility) category

NSInvocation(GSCompatibility)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

initWithArgframe:selector:

- (id) initWithArgframe: (arglist_t)args selector: (SEL)selector;

Description forthcoming.


returnFrame:

- (retval_t) returnFrame: (arglist_t)args;

Description forthcoming.


Software documentation for the NSLock(GSCategories) category

NSLock(GSCategories)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

newLockAt:

+ (id) newLockAt: (id*)location;

Initializes the id pointed to by location with a new instance of the receiver's class in a thread safe manner, unless it has been previously initialized. Returns the contents pointed to by location. The location is considered unintialized if it contains nil.
This method is used in the GS_INITIALIZED_LOCK macro to initialize lock variables when it cannot be insured that they can be initialized in a thread safe environment.

 NSLock *my_lock = nil;

 void function (void)
 {
   [GS_INITIALIZED_LOCK(my_lock, NSLock) lock];
   do_work ();
   [my_lock unlock];
 }
 
 


Software documentation for the NSMutableString(GSCategories) category

NSMutableString(GSCategories)

Declared in:
GNUstepBase/GSCategories.h
Standards:

GNUstep specific (non-standard) additions to the NSMutableString class.

Method summary

deletePrefix:

- (void) deletePrefix: (NSString*)prefix;

Removes the specified prefix from the string. Raises an exception if the prefix is not present.


deleteSuffix:

- (void) deleteSuffix: (NSString*)suffix;

Removes the specified suffix from the string. Raises an exception if the suffix is not present.


replaceString:withString:

- (void) replaceString: (NSString*)replace withString: (NSString*)by;

Replaces all occurrances of the string replace with the string by in the receiver.
Has no effect if replace does not occur within the receiver. NB. an empty string is not considered to exist within the receiver.
Calls - replaceOccurrencesOfString:withString:options:range: passing zero for the options and a range from 0 with the length of the receiver.


trimLeadSpaces

- (void) trimLeadSpaces;

Removes all leading white space from the receiver.


trimSpaces

- (void) trimSpaces;

Removes all leading or trailing white space from the receiver.


trimTailSpaces

- (void) trimTailSpaces;

Removes all trailing white space from the receiver.


Software documentation for the NSNumber(GSCategories) category

NSNumber(GSCategories)

Declared in:
GNUstepBase/GSCategories.h
Standards:

GNUstep specific (non-standard) additions to the NSNumber class.

Method summary

valueFromString:

+ (NSValue*) valueFromString: (NSString*)string;

Description forthcoming.


Software documentation for the NSObject(GSCategories) category

NSObject(GSCategories)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Extension methods for the NSObject class

Method summary

compare:

- (NSComparisonResult) compare: (id)anObject;

WARNING: The -compare: method for NSObject is deprecated due to subclasses declaring the same selector with conflicting signatures. Comparision of arbitrary objects is not just meaningless but also dangerous as most concrete implementations expect comparable objects as arguments often accessing instance variables directly. This method will be removed in a future release.


notImplemented:

- (id) notImplemented: (SEL)aSel;

Description forthcoming.


shouldNotImplement:

- (id) shouldNotImplement: (SEL)aSel;

Description forthcoming.


subclassResponsibility:

- (id) subclassResponsibility: (SEL)aSel;

Description forthcoming.


Software documentation for the NSObject(GSCompatibility) informal protocol

NSObject(GSCompatibility)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

notImplemented:

+ (id) notImplemented: (SEL)selector;

Description forthcoming.


isInstance

- (BOOL) isInstance;

Description forthcoming.


Software documentation for the NSProcessInfo(GSCompatibility) category

NSProcessInfo(GSCompatibility)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

debugSet

- (NSMutableSet*) debugSet;

Description forthcoming.


Software documentation for the NSRecursiveLock(GSCategories) category

NSRecursiveLock(GSCategories)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

newLockAt:

+ (id) newLockAt: (id*)location;

Initializes the id pointed to by location with a new instance of the receiver's class in a thread safe manner, unless it has been previously initialized. Returns the contents pointed to by location. The location is considered unintialized if it contains nil.
This method is used in the GS_INITIALIZED_LOCK macro to initialize lock variables when it cannot be insured that they can be initialized in a thread safe environment.

 NSLock *my_lock = nil;

 void function (void)
 {
   [GS_INITIALIZED_LOCK(my_lock, NSRecursiveLock) lock];
   do_work ();
   [my_lock unlock];
 }
 
 


Software documentation for the NSString(GSCategories) category

NSString(GSCategories)

Declared in:
GNUstepBase/GSCategories.h
Standards:

GNUstep specific (non-standard) additions to the NSString class.

Method summary

stringWithFormat:arguments:

+ (id) stringWithFormat: (NSString*)format arguments: (va_list)argList;

Returns an autoreleased string initialized with -initWithFormat:arguments: .


stringByDeletingPrefix:

- (NSString*) stringByDeletingPrefix: (NSString*)prefix;

Returns a string formed by removing the prefix string from the receiver. Raises an exception if the prefix is not present.


stringByDeletingSuffix:

- (NSString*) stringByDeletingSuffix: (NSString*)suffix;

Returns a string formed by removing the suffix string from the receiver. Raises an exception if the suffix is not present.


stringByReplacingString:withString:

- (NSString*) stringByReplacingString: (NSString*)replace withString: (NSString*)by;

Returns a string in which any (and all) occurrances of replace in the receiver have been replaced with by. Returns the receiver if replace does not occur within the receiver. NB. an empty string is not considered to exist within the receiver.


stringByTrimmingLeadSpaces

- (NSString*) stringByTrimmingLeadSpaces;

Returns a string formed by removing leading white space from the receiver.


stringByTrimmingSpaces

- (NSString*) stringByTrimmingSpaces;

Returns a string formed by removing both leading and trailing white space from the receiver.


stringByTrimmingTailSpaces

- (NSString*) stringByTrimmingTailSpaces;

Returns a string formed by removing trailing white space from the receiver.


Software documentation for the NSString(GSCompatibility) category

NSString(GSCompatibility)

Declared in:
GNUstepBase/GSCategories.h
Standards:

Description forthcoming.

Method summary

boolValue

- (BOOL) boolValue;

Description forthcoming.


substringFromRange:

- (NSString*) substringFromRange: (NSRange)range;

Description forthcoming.



Up