]> err.no Git - sope/blob - sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.h
fixed OGo bug #888
[sope] / sope-appserver / NGObjWeb / SoObjects / SoSelectorInvocation.h
1 /*
2   Copyright (C) 2002-2004 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21 // $Id$
22
23 #ifndef __SoObjects_SoSelectorInvocation_H__
24 #define __SoObjects_SoSelectorInvocation_H__
25
26 #import <Foundation/NSObject.h>
27
28 /*
29   An invocation object for Objective-C selector based SoClass methods. Multiple
30   selectors can map to a single SoClass method because those methods have a
31   name independend from the arguments.
32 */
33
34 @class NSString, NSDictionary;
35
36 @interface SoSelectorInvocation : NSObject
37 {
38   SEL sel;
39   int argCount;
40   struct {
41     int addContextParameter:1;
42     int reserved:31;
43   } flags;
44   /* for bound invocations */
45   IMP method;
46   id  object;
47   
48   NSDictionary *argumentSpecifications;
49 }
50
51 - (id)initWithSelectorNamed:(NSString *)_sel addContextParameter:(BOOL)_f;
52
53 /* configuration */
54
55 - (void)addSelectorNamed:(NSString *)_name;
56
57 - (void)setDoesAddContextParameter:(BOOL)_flag;
58 - (BOOL)doesAddContextParameter;
59
60 - (void)setArgumentSpecifications:(NSDictionary *)_specs;
61 - (NSDictionary *)argumentSpecifications;
62
63 /* binding */
64
65 - (BOOL)isBound;
66 - (id)bindToObject:(id)_object inContext:(id)_ctx;
67
68 @end
69
70 #endif /* __SoObjects_SoSelectorInvocation_H__ */