mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Place holder non-implementations from Fedor
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@258 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e3f2a7d9c1
commit
3e963463e1
6 changed files with 1085 additions and 0 deletions
|
@ -21,6 +21,96 @@
|
|||
#ifndef __NSArray_h_OBJECTS_INCLUDE
|
||||
#define __NSArray_h_OBJECTS_INCLUDE
|
||||
|
||||
#include <objects/Array.h>
|
||||
#include <foundation/NSRange.h>
|
||||
|
||||
@class NSString;
|
||||
|
||||
enum {NSNotInArray = 0x7fffffff}; // to be obsoleted soon
|
||||
|
||||
@interface NSArray: Array
|
||||
|
||||
+ allocWithZone:(NSZone *)zone;
|
||||
+ array;
|
||||
+ arrayWithObject:anObject;
|
||||
+ arrayWithObjects:firstObj, ...;
|
||||
- initWithObjects:(id *)objects count:(unsigned)count;
|
||||
- initWithObjects:firstObj, ...;
|
||||
- initWithArray:(NSArray *)array;
|
||||
|
||||
- (unsigned)count;
|
||||
- objectAtIndex:(unsigned)index;
|
||||
|
||||
- (unsigned)indexOfObjectIdenticalTo:anObject;
|
||||
- (unsigned)indexOfObject:anObject;
|
||||
- (BOOL)containsObject:anObject;
|
||||
- (BOOL)isEqualToArray:(NSArray *)otherArray;
|
||||
- lastObject;
|
||||
|
||||
- (void)makeObjectsPerform:(SEL)aSelector;
|
||||
- (void)makeObjectsPerform:(SEL)aSelector withObject:argument;
|
||||
|
||||
- (NSArray *)sortedArrayUsingSelector:(SEL)comparator;
|
||||
- (NSArray *)sortedArrayUsingFunction:(int (*)(id, id, void *))comparator
|
||||
context:(void *)context;
|
||||
- (NSString *)componentsJoinedByString:(NSString *)separator;
|
||||
|
||||
- firstObjectCommonWithArray:(NSArray *)otherArray;
|
||||
- (NSArray *)subarrayWithRange:(NSRange)range;
|
||||
//- (id <NSEnumerator>)objectEnumerator;
|
||||
//- (id <NSEnumerator>)reverseObjectEnumerator;
|
||||
- (NSString *)description;
|
||||
- (NSString *)descriptionWithIndent:(unsigned)level;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSMutableArray: NSArray
|
||||
|
||||
+ allocWithZone:(NSZone *)zone;
|
||||
+ arrayWithCapacity:(unsigned)numItems;
|
||||
- initWithCapacity:(unsigned)numItems;
|
||||
|
||||
- (void)addObject:anObject;
|
||||
- (void)replaceObjectAtIndex:(unsigned)index withObject:anObject;
|
||||
- (void)removeLastObject;
|
||||
- (void)insertObject:anObject atIndex:(unsigned)index;
|
||||
- (void)removeObjectAtIndex:(unsigned)index;
|
||||
|
||||
- (void)removeObjectIdenticalTo:anObject;
|
||||
- (void)removeObject:anObject;
|
||||
- (void)removeAllObjects;
|
||||
- (void)addObjectsFromArray:(NSArray *)otherArray;
|
||||
- (void)removeObjectsFromIndices:(unsigned *)indices numIndices:(unsigned)count;
|
||||
- (void)removeObjectsInArray:(NSArray *)otherArray;
|
||||
- (void)sortUsingFunction:(int (*)(id, id, void *))compare
|
||||
context:(void *)context;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __NSArray_h_OBJECTS_INCLUDE */
|
||||
/* Interface for NSArray for GNUStep
|
||||
Copyright (C) 1994 NeXT Computer, Inc.
|
||||
|
||||
This file is part of the GNU Objective C Class Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __NSArray_h_OBJECTS_INCLUDE
|
||||
#define __NSArray_h_OBJECTS_INCLUDE
|
||||
|
||||
#include <objects/stdobjects.h>
|
||||
#include <objects/Array.h>
|
||||
#include <foundation/NSRange.h>
|
||||
|
|
|
@ -1,3 +1,83 @@
|
|||
/* Interface for NSCoder for GNUStep
|
||||
Copyright (C) 1994 NeXT Computer, Inc.
|
||||
|
||||
This file is part of the GNU Objective C Class Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __NSCoder__include__
|
||||
#define __NSCoder__include__
|
||||
|
||||
#include <foundation/NSObject.h>
|
||||
#include <foundation/NSGeometry.h>
|
||||
#include <foundation/NSZone.h>
|
||||
|
||||
@class NSMutableData, NSData, NSString;
|
||||
|
||||
@interface NSCoder : NSObject
|
||||
{
|
||||
NSMutableData *_data;
|
||||
}
|
||||
|
||||
// Encoding Data
|
||||
|
||||
- (void)encodeArrayOfObjCType:(const char *)types
|
||||
count:(unsigned)count
|
||||
at:(const void *)array;
|
||||
- (void)encodeBycopyObject:(id)anObject;
|
||||
- (void)encodeConditionalObject:(id)anObject;
|
||||
- (void)encodeDataObject:(NSData *)data;
|
||||
- (void)encodeObject:(id)anObject;
|
||||
- (void)encodePropertyList:(id)plist;
|
||||
- (void)encodePoint:(NSPoint)point;
|
||||
- (void)encodeRect:(NSRect)rect;
|
||||
- (void)encodeRootObject:(id)rootObject;
|
||||
- (void)encodeSize:(NSSize)size;
|
||||
- (void)encodeValueOfObjCType:(const char *)type
|
||||
at:(const void *)address;
|
||||
- (void)encodeValuesOfObjCTypes:(const char *)types,...;
|
||||
|
||||
// Decoding Data
|
||||
|
||||
- (void)decodeArrayOfObjCType:(const char *)types
|
||||
count:(unsigned)count
|
||||
at:(void *)address;
|
||||
- (NSData *)decodeDataObject;
|
||||
- (id)decodeObject;
|
||||
- (id)decodePropertyList;
|
||||
- (NSPoint)decodePoint;
|
||||
- (NSRect)decodeRect;
|
||||
- (NSSize)decodeSize;
|
||||
- (void)decodeValueOfObjCType:(const char *)type
|
||||
at:(void *)address;
|
||||
- (void)decodeValuesOfObjCTypes:(const char *)types,...;
|
||||
|
||||
// Managing Zones
|
||||
|
||||
- (NSZone *)objectZone;
|
||||
- (void)setObjectZone:(NSZone *)zone;
|
||||
|
||||
// Getting a Version
|
||||
|
||||
- (unsigned int)systemVersion;
|
||||
- (unsigned int)versionForClassName:(NSString *)className;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __NSCoder__include__ */
|
||||
/* From:
|
||||
* (Preliminary Documentation) Copyright (c) 1994 by NeXT Computer, Inc.
|
||||
* All Rights Reserved.
|
||||
|
|
|
@ -1,3 +1,70 @@
|
|||
/* Interface for NSDictionary for GNUStep
|
||||
Copyright (C) 1994 NeXT Computer, Inc.
|
||||
|
||||
This file is part of the GNU Objective C Class Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef _NSDictionary_h_OBJECTS_INCLUDE
|
||||
#define _NSDictionary_h_OBJECTS_INCLUDE
|
||||
|
||||
#include <objects/Dictionary.h>
|
||||
|
||||
@class NSArray;
|
||||
@class NSString;
|
||||
|
||||
@interface NSDictionary : Dictionary <NSCopying>
|
||||
|
||||
+ allocWithZone:(NSZone *)zone;
|
||||
+ dictionary;
|
||||
+ dictionaryWithObjects:(id *)objects forKeys:(NSString **)keys count:(unsigned)count;
|
||||
+ dictionaryWithObjects:(NSArray *)objects forKeys:(NSArray *)keys;
|
||||
- initWithObjects:(id *)objects forKeys:(NSString **)keys count:(unsigned)count;
|
||||
- initWithDictionary:(NSDictionary *)otherDictionary;
|
||||
- initWithContentsOfFile:(NSString *)path;
|
||||
|
||||
- (unsigned)count;
|
||||
- objectForKey:(NSString *)aKey;
|
||||
//- (NSEnumerator *)keyEnumerator;
|
||||
- (BOOL)isEqualToDictionary:(NSDictionary *)other;
|
||||
- (NSString *)description;
|
||||
- (NSString *)descriptionWithIndent:(unsigned)level;
|
||||
- (NSArray *)allKeys;
|
||||
- (NSArray *)allValues;
|
||||
- (NSArray *)allKeysForObject:anObject;
|
||||
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
|
||||
//- (NSEnumerator *)objectEnumerator;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSMutableDictionary: NSDictionary
|
||||
|
||||
+ allocWithZone:(NSZone *)zone;
|
||||
+ dictionaryWithCapacity:(unsigned)numItems;
|
||||
- initWithCapacity:(unsigned)numItems;
|
||||
|
||||
- (void)setObject:anObject forKey:(NSString *)aKey;
|
||||
- (void)removeObjectForKey:(NSString *)aKey;
|
||||
- (void)removeAllObjects;
|
||||
- (void)removeObjectsForKeys:(NSArray *)keyArray;
|
||||
- (void)addEntriesFromDictionary:(NSDictionary *)otherDictionary;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
/* NSDictionary.h
|
||||
Basic dictionary container
|
||||
Copyright 1993, 1994, NeXT, Inc.
|
||||
|
|
257
Source/NSArray.m
257
Source/NSArray.m
|
@ -1,3 +1,260 @@
|
|||
/* NSArray - Array object to hold other objects.
|
||||
Copyright (C) 1993,1994 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Adam Fedor <fedor@boulder.colorado.edu>
|
||||
Date: Mar 1995
|
||||
|
||||
This file is part of the GNU Objective C Class Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <foundation/NSArray.h>
|
||||
#include <foundation/NSString.h>
|
||||
|
||||
@implementation NSArray
|
||||
|
||||
+ allocWithZone:(NSZone *)zone
|
||||
{
|
||||
return [[[NSArray alloc] init] autorelease];
|
||||
}
|
||||
|
||||
+ array
|
||||
{
|
||||
return [[[self alloc] init] autorelease];
|
||||
}
|
||||
|
||||
+ arrayWithObject:anObject
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ arrayWithObjects:firstObj, ...
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- initWithObjects:(id *)objects count:(unsigned)count
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- initWithObjects:firstObj, ...
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- initWithArray:(NSArray *)array
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
- (unsigned)count
|
||||
{
|
||||
return [super count];
|
||||
}
|
||||
|
||||
- objectAtIndex:(unsigned)index
|
||||
{
|
||||
return [super objectAtIndex:index];
|
||||
}
|
||||
|
||||
- (unsigned)indexOfObjectIdenticalTo:anObject
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned)indexOfObject:anObject
|
||||
{
|
||||
return [super indexOfObject:anObject];
|
||||
}
|
||||
|
||||
- (BOOL)containsObject:anObject
|
||||
{
|
||||
return [super includesObject:anObject];
|
||||
}
|
||||
|
||||
- (BOOL)isEqualToArray:(NSArray *)otherArray;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- lastObject
|
||||
{
|
||||
return [super lastObject];
|
||||
}
|
||||
|
||||
- (void)makeObjectsPerform:(SEL)aSelector
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)makeObjectsPerform:(SEL)aSelector withObject:argument
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
|
||||
- (NSArray *)sortedArrayUsingSelector:(SEL)comparator
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSArray *)sortedArrayUsingFunction:(int (*)(id, id, void *))comparator
|
||||
context:(void *)context
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSString *)componentsJoinedByString:(NSString *)separator
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
- firstObjectCommonWithArray:(NSArray *)otherArray
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSArray *)subarrayWithRange:(NSRange)range
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
//- (NSEnumerator *)objectEnumerator
|
||||
//{
|
||||
// [self notImplemented:_cmd];
|
||||
//}
|
||||
|
||||
//- (NSEnumerator *)reverseObjectEnumerator
|
||||
//{
|
||||
// [self notImplemented:_cmd];
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSString *)descriptionWithIndent:(unsigned)level
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSMutableArray: NSArray
|
||||
|
||||
+ allocWithZone:(NSZone *)zone
|
||||
{
|
||||
return [[[NSMutableArray alloc] init] autorelease];
|
||||
}
|
||||
|
||||
+ arrayWithCapacity:(unsigned)numItems
|
||||
{
|
||||
return [[[self alloc] initWithCapacity:numItems] autorelease];
|
||||
}
|
||||
|
||||
- initWithCapacity:(unsigned)numItems
|
||||
{
|
||||
return [super initWithCapacity:numItems];
|
||||
}
|
||||
|
||||
- (void)addObject:anObject
|
||||
{
|
||||
[super addObject:[anObject retain]];
|
||||
}
|
||||
|
||||
- (void)replaceObjectAtIndex:(unsigned)index withObject:anObject
|
||||
{
|
||||
id old;
|
||||
old = [super replaceObjectAtIndex:index with:[anObject retain]];
|
||||
[old release];
|
||||
}
|
||||
|
||||
- (void)removeLastObject
|
||||
{
|
||||
[[super removeLastObject] release];
|
||||
}
|
||||
|
||||
- (void)insertObject:anObject atIndex:(unsigned)index
|
||||
{
|
||||
[super insertObject:[anObject retain] atIndex:index];
|
||||
}
|
||||
|
||||
- (void)removeObjectAtIndex:(unsigned)index
|
||||
{
|
||||
[[super removeObjectAtIndex:index] release];
|
||||
}
|
||||
|
||||
- (void)removeObjectIdenticalTo:anObject
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)removeObject:anObject
|
||||
{
|
||||
[[super removeObjectAtIndex:[super indexOfObject:anObject]] release];
|
||||
}
|
||||
|
||||
- (void)removeAllObjects
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)addObjectsFromArray:(NSArray *)otherArray
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)removeObjectsFromIndices:(unsigned *)indices numIndices:(unsigned)count
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)removeObjectsInArray:(NSArray *)otherArray
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)sortUsingFunction:(int (*)(id, id, void *))compare
|
||||
context:(void *)context
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/* Implementation of NSArray for GNUStep
|
||||
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
||||
|
||||
|
|
347
Source/NSCoder.m
Normal file
347
Source/NSCoder.m
Normal file
|
@ -0,0 +1,347 @@
|
|||
/* NSCoder - coder obejct for serialization and persistance.
|
||||
Copyright (C) 1993,1994 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Adam Fedor <fedor@boulder.colorado.edu>
|
||||
Date: Mar 1995
|
||||
|
||||
This file is part of the GNU Objective C Class Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <foundation/NSCoder.h>
|
||||
|
||||
@implementation NSCoder
|
||||
|
||||
// Encoding Data
|
||||
|
||||
- (void)encodeArrayOfObjCType:(const char *)types
|
||||
count:(unsigned)count
|
||||
at:(const void *)array
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeBycopyObject:(id)anObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeConditionalObject:(id)anObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeDataObject:(NSData *)data;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeObject:(id)anObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodePropertyList:(id)plist;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodePoint:(NSPoint)point;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeRect:(NSRect)rect;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeRootObject:(id)rootObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeSize:(NSSize)size;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeValueOfObjCType:(const char *)type
|
||||
at:(const void *)address;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeValuesOfObjCTypes:(const char *)types,...;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
// Decoding Data
|
||||
|
||||
- (void)decodeArrayOfObjCType:(const char *)types
|
||||
count:(unsigned)count
|
||||
at:(void *)address;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (NSData *)decodeDataObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id)decodeObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id)decodePropertyList
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSPoint)decodePoint
|
||||
{
|
||||
NSPoint point;
|
||||
[self notImplemented:_cmd];
|
||||
return point;
|
||||
}
|
||||
|
||||
- (NSRect)decodeRect
|
||||
{
|
||||
NSRect rect;
|
||||
[self notImplemented:_cmd];
|
||||
return rect;
|
||||
}
|
||||
|
||||
- (NSSize)decodeSize
|
||||
{
|
||||
NSSize size;
|
||||
[self notImplemented:_cmd];
|
||||
return size;
|
||||
}
|
||||
|
||||
- (void)decodeValueOfObjCType:(const char *)type
|
||||
at:(void *)address
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)decodeValuesOfObjCTypes:(const char *)types,...;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
// Managing Zones
|
||||
|
||||
- (NSZone *)objectZone;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return (NSZone *)0;
|
||||
}
|
||||
|
||||
- (void)setObjectZone:(NSZone *)zone;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
|
||||
// Getting a Version
|
||||
|
||||
- (unsigned int)systemVersion;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned int)versionForClassName:(NSString *)className;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
@end
|
||||
/* From:
|
||||
* (Preliminary Documentation) Copyright (c) 1994 by NeXT Computer, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* NSCoder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "NSCoder.h"
|
||||
|
||||
@implementation NSCoder
|
||||
|
||||
// Encoding Data
|
||||
|
||||
- (void)encodeArrayOfObjCType:(const char *)types
|
||||
count:(unsigned)count
|
||||
at:(const void *)array
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)encodeBycopyObject:(id)anObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeConditionalObject:(id)anObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeDataObject:(NSData *)data;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeObject:(id)anObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodePropertyList:(id)plist;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodePoint:(NSPoint)point;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeRect:(NSRect)rect;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeRootObject:(id)rootObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeSize:(NSSize)size;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeValueOfObjCType:(const char *)type
|
||||
at:(const void *)address;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)encodeValuesOfObjCTypes:(const char *)types,...;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
// Decoding Data
|
||||
|
||||
- (void)decodeArrayOfObjCType:(const char *)types
|
||||
count:(unsigned)count
|
||||
at:(void *)address;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (NSData *)decodeDataObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id)decodeObject;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id)decodePropertyList
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSPoint)decodePoint
|
||||
{
|
||||
NSPoint point;
|
||||
[self notImplemented:_cmd];
|
||||
return point;
|
||||
}
|
||||
|
||||
- (NSRect)decodeRect
|
||||
{
|
||||
NSRect rect;
|
||||
[self notImplemented:_cmd];
|
||||
return rect;
|
||||
}
|
||||
|
||||
- (NSSize)decodeSize
|
||||
{
|
||||
NSSize size;
|
||||
[self notImplemented:_cmd];
|
||||
return size;
|
||||
}
|
||||
|
||||
- (void)decodeValueOfObjCType:(const char *)type
|
||||
at:(void *)address
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)decodeValuesOfObjCTypes:(const char *)types,...;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
// Managing Zones
|
||||
|
||||
- (NSZone *)objectZone;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return (NSZone *)0;
|
||||
}
|
||||
|
||||
- (void)setObjectZone:(NSZone *)zone;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
|
||||
// Getting a Version
|
||||
|
||||
- (unsigned int)systemVersion;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned int)versionForClassName:(NSString *)className;
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
@end
|
244
Source/NSDictionary.m
Normal file
244
Source/NSDictionary.m
Normal file
|
@ -0,0 +1,244 @@
|
|||
/* NSDictionary - Dictionary object to store key/value pairs
|
||||
Copyright (C) 1993,1994 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Adam Fedor <fedor@boulder.colorado.edu>
|
||||
Date: Mar 1995
|
||||
|
||||
This file is part of the GNU Objective C Class Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <foundation/NSDictionary.h>
|
||||
|
||||
@implementation NSDictionary
|
||||
|
||||
- copyWithZone:(NSZone *)zone
|
||||
{
|
||||
return [super copyWithZone:zone];
|
||||
}
|
||||
|
||||
+ allocWithZone:(NSZone *)zone
|
||||
{
|
||||
return [super allocWithZone:zone];
|
||||
}
|
||||
|
||||
+ dictionary
|
||||
{
|
||||
return [[[NSDictionary alloc] init] autorelease];
|
||||
}
|
||||
|
||||
+ dictionaryWithObjects:(id *)objects forKeys:(NSString **)keys count:(unsigned)count
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ dictionaryWithObjects:(NSArray *)objects forKeys:(NSArray *)keys
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- initWithObjects:(id *)objects forKeys:(NSString **)keys count:(unsigned)count
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- initWithDictionary:(NSDictionary *)otherDictionary
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- initWithContentsOfFile:(NSString *)path
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (unsigned)count
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- objectForKey:(NSString *)aKey
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
//- (NSEnumerator *)keyEnumerator
|
||||
//{
|
||||
// [self notImplemented:_cmd];
|
||||
//}
|
||||
|
||||
- (BOOL)isEqualToDictionary:(NSDictionary *)other
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSString *)descriptionWithIndent:(unsigned)level
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSArray *)allKeys
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSArray *)allValues
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSArray *)allKeysForObject:anObject
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
//- (NSEnumerator *)objectEnumerator
|
||||
//{
|
||||
// [self notImplemented:_cmd];
|
||||
//}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSMutableDictionary
|
||||
|
||||
+ allocWithZone:(NSZone *)zone
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ dictionaryWithCapacity:(unsigned)numItems
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- initWithCapacity:(unsigned)numItems
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
- (void)setObject:anObject forKey:(NSString *)aKey
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)removeObjectForKey:(NSString *)aKey
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)removeAllObjects
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)removeObjectsForKeys:(NSArray *)keyArray
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
- (void)addEntriesFromDictionary:(NSDictionary *)otherDictionary
|
||||
{
|
||||
[self notImplemented:_cmd];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
/* NSDictionary.h
|
||||
Basic dictionary container
|
||||
Copyright 1993, 1994, NeXT, Inc.
|
||||
NeXT, March 1993
|
||||
*/
|
||||
|
||||
#include "NSDictionary.h"
|
||||
|
||||
@implementation NSDictionary
|
||||
|
||||
- copyWithZone:(NSZone *)zone
|
||||
{
|
||||
return [super copy];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[super free];
|
||||
}
|
||||
|
||||
//+ allocWithZone:(NSZone *)zone;
|
||||
//+ dictionary;
|
||||
//+ dictionaryWithObjects:(id *)objects forKeys:(NSString **)keys count:(unsigned)count;
|
||||
//+ dictionaryWithObjects:(NSArray *)objects forKeys:(NSArray *)keys;
|
||||
//- initWithObjects:(id *)objects forKeys:(NSString **)keys count:(unsigned)count;
|
||||
//- initWithDictionary:(NSDictionary *)otherDictionary;
|
||||
//- initWithContentsOfFile:(NSString *)path;
|
||||
|
||||
//- (unsigned)count;
|
||||
//- objectForKey:(NSString *)aKey;
|
||||
//- (NSEnumerator *)keyEnumerator;
|
||||
//- (BOOL)isEqualToDictionary:(NSDictionary *)other;
|
||||
//- (NSString *)description;
|
||||
//- (NSString *)descriptionWithIndent:(unsigned)level;
|
||||
//- (NSArray *)allKeys;
|
||||
//- (NSArray *)allValues;
|
||||
//- (NSArray *)allKeysForObject:anObject;
|
||||
//- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
|
||||
//- (NSEnumerator *)objectEnumerator;
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSMutableDictionary
|
||||
|
||||
//+ allocWithZone:(NSZone *)zone;
|
||||
//+ dictionaryWithCapacity:(unsigned)numItems;
|
||||
//- initWithCapacity:(unsigned)numItems;
|
||||
|
||||
//- (void)setObject:anObject forKey:(NSString *)aKey;
|
||||
//- (void)removeObjectForKey:(NSString *)aKey;
|
||||
//- (void)removeAllObjects;
|
||||
//- (void)removeObjectsForKeys:(NSArray *)keyArray;
|
||||
//- (void)addEntriesFromDictionary:(NSDictionary *)otherDictionary;
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in a new issue