Public Member Functions |
virtual boost::uint8_t | registers () const =0 |
| Return the number of local registers needed.
|
virtual | ~as_function () |
| Destructor.
|
virtual as_function * | to_function () |
| Return this as_object as an as_function.
|
virtual as_value | call (const fn_call &fn)=0 |
| Function dispatch.
|
virtual std::string | stringValue () const |
| Return the string value of this as_object subclass.
|
as_object * | construct (as_object &newobj, const as_environment &env, FunctionArgs< as_value > &args) |
| Run this function as a constructor on an object.
|
virtual bool | isBuiltin () |
| Return true if this is a built-in class.
|
| as_object (const Global_as &global) |
| Construct an ActionScript object with no prototype associated.
|
virtual | ~as_object () |
| The as_object dtor does nothing special.
|
Property * | findProperty (const ObjectURI &uri, as_object **owner=0) |
| Find a property, scanning the inheritance chain.
|
VM & | vm () const |
| Return a reference to this as_object's global object.
|
void | dump_members () |
| Dump all properties using log_debug.
|
virtual bool | set_member (const ObjectURI &uri, const as_value &val, bool ifFound=false) |
| Set a member value.
|
void | init_member (const std::string &name, const as_value &val, int flags=DefaultFlags) |
| Initialize a member value by string.
|
void | init_member (const ObjectURI &uri, const as_value &val, int flags=DefaultFlags) |
| Initialize a member value by key.
|
void | init_property (const std::string &key, as_function &getter, as_function &setter, int flags=DefaultFlags) |
| Initialize a getter/setter property by name.
|
void | init_property (const std::string &key, as_c_function_ptr getter, as_c_function_ptr setter, int flags=DefaultFlags) |
| Initialize a getter/setter property by name.
|
void | init_property (const ObjectURI &uri, as_function &getter, as_function &setter, int flags=DefaultFlags) |
| Initialize a getter/setter property by key.
|
void | init_property (const ObjectURI &uri, as_c_function_ptr getter, as_c_function_ptr setter, int flags=DefaultFlags) |
| Initialize a getter/setter property by key.
|
bool | init_destructive_property (const ObjectURI &uri, as_function &getter, int flags=PropFlags::dontEnum) |
| Initialize a destructive getter property.
|
bool | init_destructive_property (const ObjectURI &uri, as_c_function_ptr getter, int flags=PropFlags::dontEnum) |
| Initialize a destructive getter property.
|
void | init_readonly_property (const std::string &key, as_function &getter, int flags=DefaultFlags) |
| Use this method for read-only properties.
|
void | init_readonly_property (const std::string &key, as_c_function_ptr getter, int flags=DefaultFlags) |
| Use this method for read-only properties.
|
bool | watch (const ObjectURI &uri, as_function &trig, const as_value &cust) |
| Add a watch trigger, overriding any other defined for same name.
|
bool | unwatch (const ObjectURI &uri) |
| Remove a watch trigger.
|
virtual bool | get_member (const ObjectURI &uri, as_value *val) |
| Get a property by name if it exists.
|
virtual as_object * | get_super (const ObjectURI &fname) |
as_object * | get_super () |
std::pair< bool, bool > | delProperty (const ObjectURI &uri) |
| Delete a property of this object, unless protected from deletion.
|
Property * | getOwnProperty (const ObjectURI &uri) |
| Get this object's own named property, if existing.
|
void | set_member_flags (const ObjectURI &uri, int setTrue, int setFalse=0) |
| Set member flags (probably used by ASSetPropFlags)
|
virtual bool | isSuper () const |
| Return true if this is a 'super' object.
|
void | addInterface (as_object *ctor) |
| Add an interface to the list of interfaces.
|
bool | instanceOf (as_object *ctor) |
| Check whether this object is an instance of the given constructor.
|
bool | prototypeOf (as_object &instance) |
| Check whether this object is in another object's inheritance chain.
|
void | setPropFlags (const as_value &props, int set_false, int set_true) |
| Set property flags.
|
void | copyProperties (const as_object &o) |
| Copy properties from the given object.
|
void | clearProperties () |
| Drop all properties from this object.
|
template<typename T > |
void | visitProperties (PropertyVisitor &visitor) const |
| Visit the properties of this object by key/as_value pairs.
|
void | visitKeys (KeyVisitor &visitor) const |
| Visit all visible property identifiers.
|
void | add_property (const std::string &key, as_function &getter, as_function *setter) |
| Add a getter/setter property if no member already has that name.
|
as_object * | get_prototype () const |
| Return this object's proto member.
|
void | set_prototype (const as_value &proto) |
| Set this object's proto member.
|
void | setRelay (Relay *p) |
| Set the as_object's Relay object.
|
Relay * | relay () const |
| Access the as_object's Relay object.
|
bool | array () const |
| Return true if this object should be treated as an array.
|
void | setArray (bool array=true) |
| Set whether this object should be treated as an array.
|
DisplayObject * | displayObject () const |
| Return the DisplayObject associated with this object.
|
void | setDisplayObject (DisplayObject *d) |
| Set the DisplayObject associated with this as_object.
|
| GcResource (GC &gc) |
| Create a Garbage-collected resource associated with a GC.
|
void | setReachable () const |
| Mark this resource as being reachable.
|
bool | isReachable () const |
| Return true if this object is marked as reachable.
|
void | clearReachable () const |
| Clear the reachable flag.
|
A UserFunction is a callable function defined in ActionScript.
Gnash has two types of UserFunction: 1. Function: functions parsed from a SWF
- builtin_function: functions implemented in C++ as though they were These are used to implement the API functions that the proprietary player implements in a startup script.