Gnash
0.8.11dev
|
This is a special type of function implementing AS-code in C++. More...
#include <builtin_function.h>
Public Member Functions | |
builtin_function (Global_as &gl, ASFunction func) | |
Construct a builtin function/class with a default interface. | |
virtual boost::uint8_t | registers () const |
Return the number of registers required for function execution. | |
virtual as_value | call (const fn_call &fn) |
Invoke this function or this Class constructor. | |
bool | isBuiltin () |
Return true if this is a built-in class. |
Additional Inherited Members | |
![]() | |
static const int | DefaultFlags |
The most common flags for built-in properties. | |
![]() | |
UserFunction (Global_as &gl) | |
virtual | ~UserFunction ()=0 |
This is an abstract base class! |
This is a special type of function implementing AS-code in C++.
Many functions (including classes) are implemented in ActionScript in the reference player. Gnash implements them in C++, but they must be treated like swf-defined functions. They are distinct from NativeFunctions, which are part of the player and do not go through the ActionScript interpreter.
|
inline |
Construct a builtin function/class with a default interface.
The default interface will have a constructor member set as 'this'
func | The C function to call when this as_function is invoked. For classes, the function pointer is the constructor. |
Invoke this function or this Class constructor.
Implements gnash::as_function.
References assert, and gnash::getVM().
|
inlinevirtual |
Return true if this is a built-in class.
Reimplemented from gnash::as_function.
|
inlinevirtual |
Return the number of registers required for function execution.
Gnash's C++ implementations of AS functions don't need any registers!
Implements gnash::UserFunction.