From 9b2267926417b174f95ccc8505c57f3bc03c9fd5 Mon Sep 17 00:00:00 2001 From: pyr Date: Mon, 8 May 2000 20:45:47 +0000 Subject: [PATCH] Added description for basic methods git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6586 72102866-910b-0410-8b05-ffd578937521 --- Documentation/gsdoc/NSDictionary.gsdoc | 66 ++++++++++++--- Documentation/gsdoc/NSDictionary.html | 113 +++++++++++++++++-------- 2 files changed, 132 insertions(+), 47 deletions(-) diff --git a/Documentation/gsdoc/NSDictionary.gsdoc b/Documentation/gsdoc/NSDictionary.gsdoc index 8269ee243..307b9d16f 100644 --- a/Documentation/gsdoc/NSDictionary.gsdoc +++ b/Documentation/gsdoc/NSDictionary.gsdoc @@ -7,16 +7,22 @@ - 0.1 - 28 February, 2000 + + + + + 0.2 + 25 April, 2000 NSDictionary Foundation/NSDictionary.h - NSCoding + NSCoding, NSCopying, NSMutableCopying + + allocWithZone: @@ -27,30 +33,43 @@ dictionary + Returns an empty dictionary. dictionaryWithContentsOfFile: path + Returns a dictionary using the file located at path. + The file must be a property list containing a dictionary as its root object. dictionaryWithDictionary: otherDictionary + Returns a newly created dictionary with the keys and objects of otherDictionary. + (The keys and objects are not copied.) dictionaryWithObject: anObject + forKey: + aKey + Returns a dictionary containing only one object (anObject) which is associated with aKey. dictionaryWithObjects: objects + forKey: + keys + 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. @@ -61,116 +80,134 @@ count: count + Returns a dictionary created using the C arrays objects and keys. + The number of elements in both C arrays must be count. dictionaryWithObjectsAndKeys: - object, + object, ... + 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. allKeys + Returns an array containing all the dictionary's keys. allKeysForObject: anObject + Returns an array containing all the dictionary's keys that are associated with anObject. allValues + Returns an array containing all the dictionary's objects. count + Returns an unsigned integer which is the number of elements stored in the dictionary. descriptionInStringsFileFormat + descriptionWithLocale: locale + descriptionWithLocale: locale + fileGroupOwnerAccountName + fileModificationDate + fileOwnerAccountName + filePosixPermissions + fileSize + fileSystemFileNumber + fileSystemNumber + fileType + initWithContentsOfFile: path + see dictionaryWithContentOfFile: initWithDictionary: otherDictionary - - - - initWithDictionary: - otherDictionary - + See dictionaryWithDictionary: initWithObjects: objects + See dictionaryWithObjects: + initWithObjects: objects @@ -179,40 +216,47 @@ count: count + see dictionaryWithObjects: forKeys: count: initWithObjectsAndKeys: object, + see dictionaryWithObjectsAndKeys: isEqualToDictionary: otherDictionary + keyEnumerator + Return an enumerator object containing all the keys of the dictionary. keysSortedByValueUsingSelector: comparator + objectEnumerator + Return an enumerator object containing all the keys of the dictionary. objectForKey: aKey + Returns the first object which has aKey as key. @@ -221,6 +265,7 @@ notFoundMarker: anObject + @@ -229,6 +274,7 @@ atomically: flag + diff --git a/Documentation/gsdoc/NSDictionary.html b/Documentation/gsdoc/NSDictionary.html index 980b4fbe4..cf3d65f18 100644 --- a/Documentation/gsdoc/NSDictionary.html +++ b/Documentation/gsdoc/NSDictionary.html @@ -10,35 +10,39 @@
Richard Frith-Macdonald
+
Pierre-Yves Rivaille +
-

Version: 0.1

-

Date: 28 February, 2000

+

Version: 0.2

+

Date: 25 April, 2000

NSDictionary

NSDictionary

Declared in: Foundation/NSDictionary.h

Inherits from: NSObject

-

Conforms to: NSCoding +

Conforms to: NSCoding, NSCopying, NSMutableCopying


+ +

allocWithZone:

@@ -69,176 +72,212 @@

dictionary

+ (id) dictionary
+ Returns an empty dictionary.

dictionaryWithContentsOfFile:

+ (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.

dictionaryWithDictionary:

+ (id) dictionaryWithDictionary: (NSDictionary*)otherDictionary
+ Returns a newly created dictionary with the keys and objects of otherDictionary. + (The keys and objects are not copied.)
-

dictionaryWithObject:

-+ (id) dictionaryWithObject: (id)anObject
+

dictionaryWithObject:forKey:

++ (id) dictionaryWithObject: (id)anObject forKey: (id)aKey
+ Returns a dictionary containing only one object (anObject) which is associated with aKey.
-

dictionaryWithObjects:

-+ (id) dictionaryWithObjects: (NSArray*)objects
+

dictionaryWithObjects:forKey:

++ (id) dictionaryWithObjects: (NSArray*)objects forKey: (NSArray*)keys
+ 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.

dictionaryWithObjects:forKeys:count:

+ (id) dictionaryWithObjects: (id*)objects forKeys: (id*)keys count: (unsigned int)count
+ Returns a dictionary created using the C arrays objects and keys. + The number of elements in both C arrays must be count.

dictionaryWithObjectsAndKeys:

-+ (id) dictionaryWithObjectsAndKeys: (id)object,
++ (id) dictionaryWithObjectsAndKeys: (id)object, ...
+ 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.

allKeys

- (NSArray*) allKeys
+ Returns an array containing all the dictionary's keys.

allKeysForObject:

- (NSArray*) allKeysForObject: (id)anObject
+ Returns an array containing all the dictionary's keys that are associated with anObject.

allValues

- (NSArray*) allValues
+ Returns an array containing all the dictionary's objects.

count

- (unsigned int) count
+ Returns an unsigned integer which is the number of elements stored in the dictionary.

descriptionInStringsFileFormat

- (NSString*) descriptionInStringsFileFormat
+

descriptionWithLocale:

- (NSString*) descriptionWithLocale: (NSDictionary*)locale
+

descriptionWithLocale:

- (NSString*) descriptionWithLocale: (NSDictionary*)locale
+

fileGroupOwnerAccountName

- (NSString*) fileGroupOwnerAccountName
+

fileModificationDate

- (NSDate*) fileModificationDate
+

fileOwnerAccountName

- (NSString*) fileOwnerAccountName
+

filePosixPermissions

- (unsigned long) filePosixPermissions
+

fileSize

- (unsigned long long) fileSize
+

fileSystemFileNumber

- (unsigned long) fileSystemFileNumber
+

fileSystemNumber

- (unsigned long) fileSystemNumber
+

fileType

- (NSString*) fileType
+

initWithContentsOfFile:

- (id) initWithContentsOfFile: (NSString*)path
+ see dictionaryWithContentOfFile:

initWithDictionary:

- (id) initWithDictionary: (NSDictionary*)otherDictionary
+ See dictionaryWithDictionary:
-

initWithDictionary:

-- (id) initWithDictionary: (NSDictionary*)otherDictionary
- - -
-

initWithObjects:

+

initWithObjects:

- (id) initWithObjects: (NSArray*)objects
+ See dictionaryWithObjects:
-

initWithObjects:forKeys:count:

+

initWithObjects:forKeys:count:

- (id) initWithObjects: (id*)objects forKeys: (id*)keys count: (unsigned int)count
+ see dictionaryWithObjects: forKeys: count:
-

initWithObjectsAndKeys:

+

initWithObjectsAndKeys:

- (id) initWithObjectsAndKeys: (id)object,
+ see dictionaryWithObjectsAndKeys:
-

isEqualToDictionary:

+

isEqualToDictionary:

- (BOOL) isEqualToDictionary: (NSDictionary*)otherDictionary
+
-

keyEnumerator

+

keyEnumerator

- (NSEnumerator*) keyEnumerator
+ Return an enumerator object containing all the keys of the dictionary.
-

keysSortedByValueUsingSelector:

+

keysSortedByValueUsingSelector:

- (NSArray*) keysSortedByValueUsingSelector: (SEL)comparator
+
-

objectEnumerator

+

objectEnumerator

- (NSEnumerator*) objectEnumerator
+ Return an enumerator object containing all the keys of the dictionary.
-

objectForKey:

+

objectForKey:

- (id) objectForKey: (id)aKey
+ Returns the first object which has aKey as key.
-

objectsForKeys:notFoundMarker:

+

objectsForKeys:notFoundMarker:

- (NSArray*) objectsForKeys: (NSArray*)keys notFoundMarker: (id)anObject
+
-

writeToFile:atomically:

+

writeToFile:atomically:

- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)flag
+