1 /* CardGroup.h - this file is part of SOPE
3 * Copyright (C) 2006 Inverse groupe conseil
5 * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
7 * This file is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This file is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
26 #import "CardElement.h"
29 @class NSMutableArray;
32 @interface CardGroup : CardElement <NSCopying>
34 NSMutableArray *children;
37 + (id) parseSingleFromSource: (id) source;
38 + (NSArray *) parseFromSource: (id) source;
40 + (id) groupWithTag: (NSString *) aTag;
41 + (id) groupWithTag: (NSString *) aTag
42 children: (NSArray *) someChildren;
44 - (Class) classForTag: (NSString *) tagClass;
46 - (CardElement *) uniqueChildWithTag: (NSString *) aTag;
47 - (void) setUniqueChild: (CardElement *) aChild;
49 - (void) addChild: (CardElement *) aChild;
50 - (void) addChildren: (NSArray *) someChildren;
52 - (NSArray *) children;
53 - (NSArray *) childrenWithTag: (NSString *) aTag;
54 - (NSArray *) childrenWithAttribute: (NSString *) anAttribute
55 havingValue: (NSString *) aValue;
56 - (NSArray *) childrenWithTag: (NSString *) aTag
57 andAttribute: (NSString *) anAttribute
58 havingValue: (NSString *) aValue;
59 - (NSArray *) childrenGroupWithTag: (NSString *) aTag
60 withChild: (NSString *) aChild
61 havingSimpleValue: (NSString *) aValue;
63 - (void) addChildWithTag: (NSString *) aTag
64 types: (NSArray *) someTypes
65 singleValue: (NSString *) aValue;
68 - (CardGroup *) groupWithClass: (Class) groupClass;
69 - (void) setChildrenAsCopy: (NSMutableArray *) someChildren;
71 - (void) replaceThisElement: (CardElement *) oldElement
72 withThisOne: (CardElement *) newElement;
76 #endif /* CARDGROUP_H */