mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 17:41:05 +00:00
Handle property lists.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3047 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bd110748d4
commit
f7c949afaa
1 changed files with 12 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <gnustep/base/preface.h>
|
#include <gnustep/base/preface.h>
|
||||||
#include <Foundation/NSData.h>
|
#include <Foundation/NSData.h>
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
|
#include <Foundation/NSSerialization.h>
|
||||||
|
|
||||||
@implementation NSCoder
|
@implementation NSCoder
|
||||||
|
|
||||||
|
@ -117,7 +118,9 @@
|
||||||
|
|
||||||
- (void) encodePropertyList: (id)plist
|
- (void) encodePropertyList: (id)plist
|
||||||
{
|
{
|
||||||
[self notImplemented:_cmd];
|
id anObject = [NSSerializer serializePropertyList: plist];
|
||||||
|
[self encodeValueOfObjCType:@encode(id)
|
||||||
|
at: &anObject];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) encodePoint: (NSPoint)point
|
- (void) encodePoint: (NSPoint)point
|
||||||
|
@ -202,8 +205,14 @@
|
||||||
|
|
||||||
- (id) decodePropertyList
|
- (id) decodePropertyList
|
||||||
{
|
{
|
||||||
[self notImplemented:_cmd];
|
id o;
|
||||||
return nil;
|
id d;
|
||||||
|
[self decodeValueOfObjCType:@encode(id)
|
||||||
|
at:&d];
|
||||||
|
o = [NSSerializer deserializePropertyListFromData: d
|
||||||
|
mutableContainers: NO];
|
||||||
|
[d release];
|
||||||
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSPoint) decodePoint
|
- (NSPoint) decodePoint
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue