2
Copyright (C) 2000-2005 SKYRIX Software AG
4
This file is part of SOPE.
6
SOPE 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
SOPE 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 SOPE; see the file COPYING. If not, write to the
18
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22
#ifndef __NGObjWeb_WOTemplate_H__
23
#define __NGObjWeb_WOTemplate_H__
25
#import <Foundation/NSObject.h>
26
#include <NGObjWeb/WOElement.h>
28
@class NSURL, NSDate, NSString, NSDictionary, NSMutableDictionary;
30
@class WOTemplate, WOSubcomponentInfo, WOComponentScript;
32
@interface WOTemplate : WOElement
34
/* should add some info about the logic of the component ... */
36
WOElement *rootElement;
38
NSMutableDictionary *subcomponentInfos;
39
WOComponentScript *componentScript;
40
NSDictionary *kvcTemplateVars;
43
- (id)initWithURL:(NSURL *)_url rootElement:(WOElement *)_element;
47
- (void)setComponentScript:(WOComponentScript *)_script;
48
- (WOComponentScript *)componentScript;
50
- (void)setKeyValueArchivedTemplateVariables:(NSDictionary *)_vars;
51
- (NSDictionary *)keyValueArchivedTemplateVariables;
53
/* subcomponent info */
55
- (void)addSubcomponentWithKey:(NSString *)_key
56
name:(NSString *)_name
57
bindings:(NSDictionary *)_bindings;
59
- (BOOL)hasSubcomponentInfos;
60
- (NSEnumerator *)infoKeyEnumerator;
61
- (WOSubcomponentInfo *)subcomponentInfoForKey:(NSString *)_key;
65
- (void)setRootElement:(WOElement *)_element;
66
- (WOElement *)rootElement;
72
@interface WOSubcomponentInfo : NSObject
74
NSString *componentName;
75
NSDictionary *bindings;
78
- (id)initWithName:(NSString *)_name bindings:(NSDictionary *)_bindings;
82
- (NSString *)componentName;
83
- (NSDictionary *)bindings;
87
#endif /* __NGObjWeb_WOTemplate_H__ */