2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include "NGActiveSocket+serialization.h"
26 @implementation NGActiveSocket(serialization)
30 - (void)serializeChar:(char)_value {
31 NGStreamSerializeObjC(self, &_value, @encode(char), nil);
33 - (void)serializeShort:(short)_value {
34 NGStreamSerializeObjC(self, &_value, @encode(short), nil);
36 - (void)serializeInt:(int)_value {
37 NGStreamSerializeObjC(self, &_value, @encode(int), nil);
39 - (void)serializeLong:(long)_value {
40 NGStreamSerializeObjC(self, &_value, @encode(long), nil);
43 - (void)serializeFloat:(float)_value {
44 NGStreamSerializeObjC(self, &_value, @encode(float), nil);
46 - (void)serializeDouble:(double)_value {
47 NGStreamSerializeObjC(self, &_value, @encode(double), nil);
49 - (void)serializeLongLong:(long long)_value {
50 NGStreamSerializeObjC(self, &_value, @encode(long long), nil);
53 - (void)serializeCString:(const char *)_value {
54 NGStreamSerializeObjC(self, &_value, @encode(char *), nil);
58 - (void)serializeDataAt:(const void*)_value ofObjCType:(const char*)_type
59 context:(id<NSObjCTypeSerializationCallBack>)_callback {
61 NGStreamSerializeObjC(self, _value, _type, _callback);
67 - (char)deserializeChar {
69 NGStreamDeserializeObjC(self, &c, @encode(char), nil);
72 - (short)deserializeShort {
74 NGStreamDeserializeObjC(self, &s, @encode(short), nil);
77 - (int)deserializeInt {
79 NGStreamDeserializeObjC(self, &i, @encode(int), nil);
82 - (long)deserializeLong {
84 NGStreamDeserializeObjC(self, &l, @encode(long), nil);
87 - (float)deserializeFloat {
89 NGStreamDeserializeObjC(self, &f, @encode(float), nil);
93 - (double)deserializeDouble {
95 NGStreamDeserializeObjC(self, &d, @encode(double), nil);
98 - (long long)deserializeLongLong {
100 NGStreamDeserializeObjC(self, &l, @encode(long long), nil);
104 - (char *)deserializeCString {
106 NGStreamDeserializeObjC(self, &result, @encode(char *), nil);
111 - (void)deserializeDataAt:(void *)_value ofObjCType:(const char *)_type
112 context:(id<NSObjCTypeSerializationCallBack>)_callback
114 NGStreamDeserializeObjC(self, _value, _type, _callback);
118 @end /* NGActiveSocket(serialization) */
120 void __link_NGActiveSocket_serialization(void) {
121 __link_NGActiveSocket_serialization();