API  0.9.10
CPPropertyListSerialization.j
Go to the documentation of this file.
1 /*
2  * CPPropertyListSerialization.j
3  * Foundation
4  *
5  * Created by Francisco Tolmasky.
6  * Copyright 2008, 280 North, Inc.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 
24 
26 CPPropertyListOpenStepFormat = kCFPropertyListOpenStepFormat;
27 CPPropertyListXMLFormat_v1_0 = kCFPropertyListXMLFormat_v1_0;
28 CPPropertyListBinaryFormat_v1_0 = kCFPropertyListBinaryFormat_v1_0;
29 CPPropertyList280NorthFormat_v1_0 = kCFPropertyList280NorthFormat_v1_0;
30 @implementation CPPropertyListSerialization : CPObject
31 {
32  id __doxygen__;
33 }
34 
35 + (CPData)dataFromPropertyList:(id)aPlist format:(CPPropertyListFormat)aFormat
36 {
37  return CPPropertyListCreateData(aPlist, aFormat);
38 }
39 
40 + (id)propertyListFromData:(CPData)data format:(CPPropertyListFormat)aFormat
41 {
42  return CPPropertyListCreateFromData(data, aFormat);
43 }
44 
45 @end
46 
48 
49 + (CPData)dataFromPropertyList:(id)aPlist format:(CPPropertyListFormat)aFormat errorDescription:(id)anErrorString
50 {
51  _CPReportLenientDeprecation(self, _cmd, @selector(dataFromPropertyList:format:));
52 
53  return [self dataFromPropertyList:aPlist format:aFormat];
54 }
55 
56 + (id)propertyListFromData:(CPData)data format:(CPPropertyListFormat)aFormat errorDescription:(id)errorString
57 {
58  _CPReportLenientDeprecation(self, _cmd, @selector(propertyListFromData:format:));
59 
60  return [self propertyListFromData:data format:aFormat];
61 }
62 
63 @end
CPPropertyListBinaryFormat_v1_0
CPData dataFromPropertyList:format:(id aPlist, [format] CPPropertyListFormat aFormat)
A Cappuccino wrapper for any data type.
Definition: CPData.h:2
CPPropertyListXMLFormat_v1_0
id propertyListFromData:format:(CPData data, [format] CPPropertyListFormat aFormat)
CPPropertyList280NorthFormat_v1_0
CPPropertyListOpenStepFormat