API  1.0.0
CPCoder.j
Go to the documentation of this file.
1 /*
2  * CPCoder.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 @global _CPRaiseInvalidAbstractInvocation;
25 
33 @implementation CPCoder : CPObject
34 {
35  id __doxygen__;
36 }
37 
42 - (BOOL)allowsKeyedCoding
43 {
44  return NO;
45 }
46 
54 - (void)encodeValueOfObjJType:(CPString)aType at:(id)anObject
55 {
56  _CPRaiseInvalidAbstractInvocation(self, _cmd);
57 }
58 
63 - (void)encodeDataObject:(CPData)aData
64 {
65  _CPRaiseInvalidAbstractInvocation(self, _cmd);
66 }
67 
72 - (void)encodeObject:(id)anObject
73 {
74 // [self encodeValueOfObjCType:@encode(id) at:object];
75 }
76 
81 - (void)encodePoint:(CGPoint)aPoint
82 {
83  _CPRaiseInvalidAbstractInvocation(self, _cmd);
84 }
85 
90 - (void)encodeRect:(CGRect)aRect
91 {
92  _CPRaiseInvalidAbstractInvocation(self, _cmd);
93 }
94 
99 - (void)encodeSize:(CGSize)aSize
100 {
101  _CPRaiseInvalidAbstractInvocation(self, _cmd);
102 }
103 
108 - (void)encodePropertyList:(id)aPropertyList
109 {
110 // [self encodeValueOfObjCType:@encode(id) at:&propertyList];
111 }
112 
117 - (void)encodeRootObject:(id)anObject
118 {
119  [self encodeObject:anObject];
120 }
121 
126 - (void)encodeBycopyObject:(id)anObject
127 {
128  [self encodeObject:anObject];
129 }
130 
135 - (void)encodeConditionalObject:(id)anObject
136 {
137  [self encodeObject:anObject];
138 }
139 
140 @end
141 
142 @implementation CPObject (CPCoding)
143 
150 - (id)awakeAfterUsingCoder:(CPCoder)aDecoder
151 {
152  return self;
153 }
154 
155 @end
A Cappuccino wrapper for any data type.
Definition: CPData.h:2
An immutable string (collection of characters).
Definition: CPString.h:2
Defines methods for use when archiving & restoring (enc/decoding).
Definition: CPCoder.h:2
void encodeObject:(id anObject)
Definition: CPCoder.j:72