mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
(Object (ConnectedCoderCallbacks)): Category methods moved here from
Coder.m. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@851 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0a3c61226f
commit
23dc00a211
1 changed files with 19 additions and 0 deletions
|
@ -302,3 +302,22 @@ exc_return_null(arglist_t f)
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation Object (ConnectedCoderCallbacks)
|
||||
|
||||
/* By default, Object's encode themselves as proxies across Connection's */
|
||||
- classForConnectedCoder:aRmc
|
||||
{
|
||||
return [[aRmc connection] proxyClass];
|
||||
}
|
||||
|
||||
/* But if any object overrides the above method to return [Object class]
|
||||
instead, the Object implementation of the coding method will actually
|
||||
encode the object itself, not a proxy */
|
||||
+ (void) encodeObject: anObject withConnectedCoder: aRmc
|
||||
{
|
||||
[anObject encodeWithCoder:aRmc];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue