|
|
1.1 root 1: /*
2: FoundationExtensions.m modified by enoyau on Fri 13-Jan-1995
3:
4: You may freely copy, distribute, and reuse the code in this example.
5: NeXT disclaims any warranty of any kind, expressed or implied, as to its
6: fitness for any particular use.
7: */
8: /*
9: * Categories on NSArray and NSDictionary that allow them to be
10: * sent over the wire like a regular object. Currently only NSString,
11: * NSData and NSNumber implement the NXTransport protocol so only those
12: * classes can be sent by value over the wire.
13: *
14: * No guarantee is made for the fitness of this code for any particular
15: * use. No warranty expressed or implied. Use at your own risk!
16: *
17: * Randy Tidd
18: * NeXT Premium Developer Support
19: */
20: #import "FoundationExtensions.h"
21: #import "FoundationExtensionsPrivate.h"
22:
23: @implementation NSArray (DOExtensions)
24: - encodeRemotelyFor:connection freeAfterEncoding:(BOOL *)flag isBycopy:(BOOL)isBycopy
25: {
26: *flag = YES;
27: return [[_NSArrayPlaceHolder alloc] initWithArray:self];
28: }
29: @end
30:
31: @implementation NSDictionary (DOExtensions)
32: - encodeRemotelyFor:connection freeAfterEncoding:(BOOL *)flag isBycopy:(BOOL)isBycopy
33: {
34: *flag = YES;
35: return [[_NSDictionaryPlaceHolder alloc] initWithDictionary:self];
36: }
37: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.