Monotone-Parent: 553e03d19134ad3b614013a454242bf2cc14df0b

Monotone-Revision: 2e935ec1865c679003a2c06cc903ea9f832eff1a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-02-15T20:55:21
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-02-15 20:55:21 +00:00
parent d46b7352db
commit 9893aab976
3 changed files with 32 additions and 1 deletions
+1 -1
View File
@@ -50,6 +50,7 @@
- (void) addChildren: (NSArray *) someChildren;
- (NSArray *) children;
- (CardElement *) firstChildWithTag: (NSString *) aTag;
- (NSArray *) childrenWithTag: (NSString *) aTag;
- (NSArray *) childrenWithAttribute: (NSString *) anAttribute
havingValue: (NSString *) aValue;
@@ -64,7 +65,6 @@
types: (NSArray *) someTypes
singleValue: (NSString *) aValue;
- (CardGroup *) groupWithClass: (Class) groupClass;
- (void) setChildrenAsCopy: (NSMutableArray *) someChildren;
+27
View File
@@ -232,6 +232,33 @@ static NGCardsSaxHandler *sax = nil;
[self addChild: aChild];
}
- (CardElement *) firstChildWithTag: (NSString *) aTag;
{
Class mappedClass;
CardElement *child, *mappedChild;
NSArray *existing;
existing = [self childrenWithTag: aTag];
if ([existing count])
{
child = [existing objectAtIndex: 0];
mappedClass = [self classForTag: [aTag uppercaseString]];
if (mappedClass)
{
if ([child isKindOfClass: [CardGroup class]])
mappedChild = [(CardGroup *) child groupWithClass: mappedClass];
else
mappedChild = [child elementWithClass: mappedClass];
}
else
mappedChild = child;
}
else
mappedChild = nil;
return mappedChild;
}
- (void) addChildren: (NSArray *) someChildren
{
CardElement *currentChild;
+4
View File
@@ -1,3 +1,7 @@
2007-02-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* CardGroup.m ([CardGroup -firstChildWithTag:aTag]): new method.
2007-02-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* CardGroup.m ([CardGroup +cardParser]): find the correct parser