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 __NGScriptLanguage_H__
24 #define __NGScriptLanguage_H__
26 #import <Foundation/NSObject.h>
28 @class NGObjectMappingContext;
30 @interface NGScriptLanguage : NSObject < NSCoding >
32 + (id)languageWithName:(NSString *)_language;
33 - (id)initWithLanguage:(NSString *)_language;
37 - (id)evaluateScript:(NSString *)_script onObject:(id)_object
38 source:(NSString *)_source line:(unsigned)_line;
42 - (id)callFunction:(NSString *)_func onObject:(id)_object;
43 - (id)callFunction:(NSString *)_func withArgument:(id)_arg0 onObject:(id)_o;
44 - (id)callFunction:(NSString *)_func
45 withArgument:(id)_arg0
46 withArgument:(id)_arg1
51 - (BOOL)object:(id)_object hasFunctionNamed:(NSString *)_name;
55 - (id)createShadowForMaster:(id)_master; /* returns a retained object */
59 - (NGObjectMappingContext *)activeMappingContext;
60 - (NGObjectMappingContext *)createMappingContext; // result is retained!
65 Shadow objects are always tied to a specific language ...
68 @protocol NGScriptShadow
70 - (void)invalidateShadow;
72 - (id)evaluateScript:(NSString *)_script;
73 - (id)callScriptFunction:(NSString *)_func;
74 - (BOOL)hasFunctionNamed:(NSString *)_func;
78 #endif /* __NGScriptLanguage_H__ */