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 "XmlRpcValue.h"
26 @implementation XmlRpcValue
28 The XmlRpcValue class is used internally by the XML-RPC decoder to
29 represent any valid XML-RPC value. You should never need to use this class.
32 - (id)initWithValue:(id)_value className:(NSString *)_className {
33 if ((self = [super init])) {
36 ASSIGN(self->value, _value);
37 cName = (_className != nil)
39 : NSStringFromClass([_value class]);
41 ASSIGN(self->className, cName);
47 [self->className release];
48 [self->value release];
56 - (void)setClassName:(NSString *)_className {
57 if (_className != self->className) {
58 [self->className autorelease];
59 self->className = [_className copy];
62 - (NSString *)className {
63 return self->className;
67 return NSClassFromString([self className]);
71 return [(id<NSObject>)[self class] isKindOfClass:[NSException class]];
73 - (BOOL)isDictionary {
74 return [(id<NSObject>)[self class] isKindOfClass:[NSDictionary class]];
79 - (NSString *)description {
80 return [NSString stringWithFormat:@"XmlRpcValue: %@->%@",
87 - (id)copyWithZone:(NSZone *)zone {
88 return [[[self class] alloc]
89 initWithValue:self->value className:self->className];
92 @end /* XmlRpcValue */