/*
- Copyright (C) 2000-2005 SKYRIX Software AG
+ Copyright (C) 2000-2007 SKYRIX Software AG
+ Copyright (C) 2007 Helge Hess
This file is part of SOPE.
- (id)_decodeValueOfClass:(Class)_class {
id obj;
- obj = [[self->valueStack lastObject] value];
+ obj = [(XmlRpcValue *)[self->valueStack lastObject] value];
if ([obj isKindOfClass:_class])
return obj;
className = [value className];
if ([className length] == 0) {
- object = [value value];
+ object = [(XmlRpcValue *)value value];
}
else if ((objClass = NSClassFromString(className)) != Nil) {
object = [objClass decodeObjectWithXmlRpcCoder:self];
else {
NSLog(@"%s: class (%@) specified by value (%@) wasn't found.",
__PRETTY_FUNCTION__, className, value);
- object = [value value];
+ object = [(XmlRpcValue *)value value];
}
if (object) [self->unarchivedObjects addObject:object];
NSEnumerator *keyEnum;
NSString *key;
- dict = (NSDictionary *)[[self->valueStack lastObject] value];
+ dict = (NSDictionary *)[(XmlRpcValue *)[self->valueStack lastObject] value];
if (!([dict respondsToSelector:@selector(keyEnumerator)] &&
[dict respondsToSelector:@selector(objectForKey:)]))
NSEnumerator *valEnum;
XmlRpcValue *val = nil;
- array = (NSArray *)[[self->valueStack lastObject] value];
+ array = (NSArray *)[(XmlRpcValue *)[self->valueStack lastObject] value];
if (![array respondsToSelector:@selector(objectEnumerator)])
return nil;
XmlRpcValue *newValue;
NSDictionary *obj;
- obj = (NSDictionary *)[[self->valueStack lastObject] value];
+ obj = (NSDictionary *)[(XmlRpcValue *)[self->valueStack lastObject] value];
NSAssert(_key != nil, @"_key is not allowed to be nil");
if (![obj isKindOfClass:DictionaryClass]) {
/* *** */
- (void)_addValueToParas:(id)_value {
- id topValue = [[self->valueStack lastObject] value];
+ id topValue = [(XmlRpcValue *)[self->valueStack lastObject] value];
if ([topValue isKindOfClass:ArrayClass])
[topValue addObject:_value];
}
- (void)start_member:(id<SaxAttributes>)_attrs {
- if (![[[self->valueStack lastObject] value] isKindOfClass:DictionaryClass]) {
+ if (![[(XmlRpcValue *)[self->valueStack lastObject] value]
+ isKindOfClass:DictionaryClass]) {
self->invalidCall = YES;
}
else {
- (void)end_member {
id tmp; // TODO: can't we type the var?
- tmp = [[self->valueStack lastObject] value];
+ tmp = [(XmlRpcValue *)[self->valueStack lastObject] value];
if ([self->memberNameStack count] != [self->memberValueStack count]) {
NSLog(@"Warning(%s): memberNameStack.count != memberValueStack.count"