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_WOAssociation_H__
23 #define __NGObjWeb_WOAssociation_H__
25 #import <Foundation/NSObject.h>
27 @class WOComponent, WOContext;
29 @interface WOAssociation : NSObject /* abstract/cluster */
33 + (WOAssociation *)associationWithKeyPath:(NSString *)_keyPath;
34 + (WOAssociation *)associationWithValue:(id)_value;
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;
43 - (BOOL)isValueConstant;
44 - (BOOL)isValueSettable;
46 /* deprecated methods */
48 - (void)setValue:(id)_value; // deprecated in WO4
49 - (id)value; // deprecated in WO4
53 @interface WOAssociation(SpecialsValues)
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;
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;
67 - (void)setStringValue:(NSString *)_v inComponent:(WOComponent *)_component;
68 - (NSString *)stringValueInComponent:(WOComponent *)_component;
70 /* special context values */
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;
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;
84 - (void)setStringValue:(NSString *)_v inContext:(WOContext *)_ctx;
85 - (NSString *)stringValueInContext:(WOContext *)_ctx;
89 #endif /* __NGObjWeb_WOAssociation_H__ */