2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE 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 SOPE 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 SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #include "NGActiveSocket+serialization.h"
25 @implementation NGActiveSocket(serialization)
29 - (void)serializeChar:(char)_value {
30 NGStreamSerializeObjC(self, &_value, @encode(char), nil);
32 - (void)serializeShort:(short)_value {
33 NGStreamSerializeObjC(self, &_value, @encode(short), nil);
35 - (void)serializeInt:(int)_value {
36 NGStreamSerializeObjC(self, &_value, @encode(int), nil);
38 - (void)serializeLong:(long)_value {
39 NGStreamSerializeObjC(self, &_value, @encode(long), nil);
42 - (void)serializeFloat:(float)_value {
43 NGStreamSerializeObjC(self, &_value, @encode(float), nil);
45 - (void)serializeDouble:(double)_value {
46 NGStreamSerializeObjC(self, &_value, @encode(double), nil);
48 - (void)serializeLongLong:(long long)_value {
49 NGStreamSerializeObjC(self, &_value, @encode(long long), nil);
52 - (void)serializeCString:(const char *)_value {
53 NGStreamSerializeObjC(self, &_value, @encode(char *), nil);
57 - (void)serializeDataAt:(const void*)_value ofObjCType:(const char*)_type
58 context:(id<NSObjCTypeSerializationCallBack>)_callback {
60 NGStreamSerializeObjC(self, _value, _type, _callback);
66 - (char)deserializeChar {
68 NGStreamDeserializeObjC(self, &c, @encode(char), nil);
71 - (short)deserializeShort {
73 NGStreamDeserializeObjC(self, &s, @encode(short), nil);
76 - (int)deserializeInt {
78 NGStreamDeserializeObjC(self, &i, @encode(int), nil);
81 - (long)deserializeLong {
83 NGStreamDeserializeObjC(self, &l, @encode(long), nil);
86 - (float)deserializeFloat {
88 NGStreamDeserializeObjC(self, &f, @encode(float), nil);
92 - (double)deserializeDouble {
94 NGStreamDeserializeObjC(self, &d, @encode(double), nil);
97 - (long long)deserializeLongLong {
99 NGStreamDeserializeObjC(self, &l, @encode(long long), nil);
103 - (char *)deserializeCString {
105 NGStreamDeserializeObjC(self, &result, @encode(char *), nil);
110 - (void)deserializeDataAt:(void *)_value ofObjCType:(const char *)_type
111 context:(id<NSObjCTypeSerializationCallBack>)_callback
113 NGStreamDeserializeObjC(self, _value, _type, _callback);
117 @end /* NGActiveSocket(serialization) */
119 void __link_NGActiveSocket_serialization(void) {
120 __link_NGActiveSocket_serialization();