mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-07 12:35:27 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user