]> err.no Git - sope/blob - sope-appserver/NGObjWeb/NGObjWeb/WOAssociation.h
increased element nesting depth
[sope] / sope-appserver / NGObjWeb / NGObjWeb / WOAssociation.h
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21
22 #ifndef __NGObjWeb_WOAssociation_H__
23 #define __NGObjWeb_WOAssociation_H__
24
25 #import <Foundation/NSObject.h>
26
27 @class WOComponent, WOContext;
28
29 @interface WOAssociation : NSObject /* abstract/cluster */
30 {
31 }
32
33 + (WOAssociation *)associationWithKeyPath:(NSString *)_keyPath;
34 + (WOAssociation *)associationWithValue:(id)_value;
35
36 /* value */
37
38 - (void)setValue:(id)_value inContext:(WOContext *)_ctx;
39 - (id)valueInContext:(WOContext *)_ctx;
40 - (void)setValue:(id)_value inComponent:(WOComponent *)_component;
41 - (id)valueInComponent:(WOComponent *)_component;
42
43 - (BOOL)isValueConstant;
44 - (BOOL)isValueSettable;
45
46 /* deprecated methods */
47
48 - (void)setValue:(id)_value; // deprecated in WO4
49 - (id)value;                 // deprecated in WO4
50
51 @end
52
53 @interface WOAssociation(SpecialsValues)
54
55 - (void)setUnsignedCharValue:(unsigned char)_v inComponent:(WOComponent *)_c;
56 - (void)setCharValue:(char)_value inComponent:(WOComponent *)_component;
57 - (void)setUnsignedIntValue:(unsigned int)_v inComponent:(WOComponent *)_comp;
58 - (void)setIntValue:(int)_value inComponent:(WOComponent *)_component;
59 - (void)setBoolValue:(BOOL)_value inComponent:(WOComponent *)_component;
60
61 - (unsigned char)unsignedCharValueInComponent:(WOComponent *)_component;
62 - (char)charValueInComponent:(WOComponent *)_component;
63 - (unsigned int)unsignedIntValueInComponent:(WOComponent *)_component;
64 - (int)intValueInComponent:(WOComponent *)_component;
65 - (BOOL)boolValueInComponent:(WOComponent *)_component;
66
67 - (void)setStringValue:(NSString *)_v inComponent:(WOComponent *)_component;
68 - (NSString *)stringValueInComponent:(WOComponent *)_component;
69
70 /* special context values */
71
72 - (void)setUnsignedCharValue:(unsigned char)_v inContext:(WOContext *)_c;
73 - (void)setCharValue:(char)_value              inContext:(WOContext *)_ctx;
74 - (void)setUnsignedIntValue:(unsigned int)_v   inContext:(WOContext *)_c;
75 - (void)setIntValue:(int)_value                inContext:(WOContext *)_ctx;
76 - (void)setBoolValue:(BOOL)_value              inContext:(WOContext *)_ctx;
77
78 - (unsigned char)unsignedCharValueInContext:(WOContext *)_ctx;
79 - (char)charValueInContext:(WOContext *)_ctx;
80 - (unsigned int)unsignedIntValueInContext:(WOContext *)_ctx;
81 - (int)intValueInContext:(WOContext *)_ctx;
82 - (BOOL)boolValueInContext:(WOContext *)_ctx;
83
84 - (void)setStringValue:(NSString *)_v inContext:(WOContext *)_ctx;
85 - (NSString *)stringValueInContext:(WOContext *)_ctx;
86
87 @end
88
89 #endif /* __NGObjWeb_WOAssociation_H__ */