2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo 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 OGo 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 OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef __NGObjWeb_WOAssociation_H__
24 #define __NGObjWeb_WOAssociation_H__
26 #import <Foundation/NSObject.h>
28 @class WOComponent, WOContext;
30 @interface WOAssociation : NSObject /* abstract/cluster */
34 + (WOAssociation *)associationWithKeyPath:(NSString *)_keyPath;
35 + (WOAssociation *)associationWithValue:(id)_value;
39 - (void)setValue:(id)_value inContext:(WOContext *)_ctx;
40 - (id)valueInContext:(WOContext *)_ctx;
41 - (void)setValue:(id)_value inComponent:(WOComponent *)_component;
42 - (id)valueInComponent:(WOComponent *)_component;
44 - (BOOL)isValueConstant;
45 - (BOOL)isValueSettable;
47 /* deprecated methods */
49 - (void)setValue:(id)_value; // deprecated in WO4
50 - (id)value; // deprecated in WO4
54 @interface WOAssociation(SpecialsValues)
56 - (void)setUnsignedCharValue:(unsigned char)_v inComponent:(WOComponent *)_c;
57 - (void)setCharValue:(char)_value inComponent:(WOComponent *)_component;
58 - (void)setUnsignedIntValue:(unsigned int)_v inComponent:(WOComponent *)_comp;
59 - (void)setIntValue:(int)_value inComponent:(WOComponent *)_component;
60 - (void)setBoolValue:(BOOL)_value inComponent:(WOComponent *)_component;
62 - (unsigned char)unsignedCharValueInComponent:(WOComponent *)_component;
63 - (char)charValueInComponent:(WOComponent *)_component;
64 - (unsigned int)unsignedIntValueInComponent:(WOComponent *)_component;
65 - (int)intValueInComponent:(WOComponent *)_component;
66 - (BOOL)boolValueInComponent:(WOComponent *)_component;
68 - (void)setStringValue:(NSString *)_v inComponent:(WOComponent *)_component;
69 - (NSString *)stringValueInComponent:(WOComponent *)_component;
71 /* special context values */
73 - (void)setUnsignedCharValue:(unsigned char)_v inContext:(WOContext *)_c;
74 - (void)setCharValue:(char)_value inContext:(WOContext *)_ctx;
75 - (void)setUnsignedIntValue:(unsigned int)_v inContext:(WOContext *)_c;
76 - (void)setIntValue:(int)_value inContext:(WOContext *)_ctx;
77 - (void)setBoolValue:(BOOL)_value inContext:(WOContext *)_ctx;
79 - (unsigned char)unsignedCharValueInContext:(WOContext *)_ctx;
80 - (char)charValueInContext:(WOContext *)_ctx;
81 - (unsigned int)unsignedIntValueInContext:(WOContext *)_ctx;
82 - (int)intValueInContext:(WOContext *)_ctx;
83 - (BOOL)boolValueInContext:(WOContext *)_ctx;
85 - (void)setStringValue:(NSString *)_v inContext:(WOContext *)_ctx;
86 - (NSString *)stringValueInContext:(WOContext *)_ctx;
90 #endif /* __NGObjWeb_WOAssociation_H__ */