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 "XmlRpcClientTool.h"
25 @implementation NSObject(Printing)
27 - (void)printWithTool:(XmlRpcClientTool *)_tool {
28 printf("%s\n", [[self description] cString]);
31 @end /* NSObject(Printing) */
33 @implementation NSData(Printing)
35 - (void)printWithTool:(XmlRpcClientTool *)_tool {
36 fwrite([self bytes], [self length], 1, stdout);
39 @end /* NSData(Printing) */
41 @implementation NSDictionary(Printing)
43 - (void)printWithTool:(XmlRpcClientTool *)_tool {
44 [_tool printDictionary:self];
47 @end /* NSDictionary(Printing) */
49 @implementation NSArray(Printing)
51 - (void)printWithTool:(XmlRpcClientTool *)_tool {
52 [_tool printArray:self];
55 @end /* NSArray(Printing) */
57 @implementation NSException(Printing)
59 - (void)printWithTool:(XmlRpcClientTool *)_tool {
60 printf("Exception caught\nName : %s\nReason: %s\n",
61 [[self name] cString], [[self reason] cString]);
64 @end /* NSException(Printing) */