Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GNASH_AS_FUNCTION_H
00020 #define GNASH_AS_FUNCTION_H
00021
00022 #include <string>
00023
00024 #include "as_object.h"
00025
00026
00027 namespace gnash {
00028 class NativeFunction;
00029 class Global_as;
00030 template <typename T> class FunctionArgs;
00031 }
00032
00033 namespace gnash {
00034
00036
00062 class as_function : public as_object
00063 {
00064 public:
00065
00067 virtual ~as_function() {}
00068
00070 virtual as_function* to_function() { return this; }
00071
00073
00076 virtual as_value call(const fn_call& fn) = 0;
00077
00079
00081 virtual std::string stringValue() const;
00082
00084
00087
00092
00103 as_object* construct(as_object& newobj, const as_environment& env,
00104 FunctionArgs<as_value>& args);
00105
00107 virtual bool isBuiltin() { return false; }
00108
00109 protected:
00110
00112 as_function(Global_as& gl);
00113
00114 };
00115
00116
00118
00122
00128 as_object* constructInstance(as_function& ctor, const as_environment& env,
00129 FunctionArgs<as_value>& args);
00130
00131 }
00132
00133 #endif
00134