Public Member Functions | Protected Member Functions

gnash::AVM1Global Class Reference

#include <Globals.h>

Inheritance diagram for gnash::AVM1Global:
gnash::Global_as gnash::Global_as gnash::as_object gnash::as_object gnash::as_object gnash::as_object gnash::GcResource gnash::GcResource gnash::GcResource gnash::GcResource gnash::GcResource gnash::GcResource gnash::GcResource gnash::GcResource

List of all members.

Public Member Functions

 AVM1Global (VM &vm)
 ~AVM1Global ()
void registerClasses ()
virtual as_objectcreateString (const std::string &s)
 Create a String object.
virtual as_objectcreateNumber (double d)
 Create a Number object.
virtual as_objectcreateBoolean (bool b)
 Create a Boolean object.
virtual as_objectcreateObject ()
 Create an Object.
virtual as_objectcreateArray ()
 Construct an Array.
virtual const ClassHierarchyclassHierarchy () const
virtual ClassHierarchyclassHierarchy ()
virtual VMgetVM () const
virtual builtin_functioncreateFunction (Global_as::ASFunction function)
 Create an ActionScript function.
virtual as_objectcreateClass (Global_as::ASFunction ctor, as_object *prototype)
 Create an ActionScript class.
 AVM1Global (VM &vm)
 ~AVM1Global ()
void registerClasses ()
virtual as_objectcreateString (const std::string &s)
 Create a String object.
virtual as_objectcreateNumber (double d)
 Create a Number object.
virtual as_objectcreateBoolean (bool b)
 Create a Boolean object.
virtual as_objectcreateObject ()
 Create an Object.
virtual as_objectcreateArray ()
 Create an Array object.
virtual const ClassHierarchyclassHierarchy () const
virtual ClassHierarchyclassHierarchy ()
virtual VMgetVM () const
virtual builtin_functioncreateFunction (Global_as::ASFunction function)
 Create an ActionScript function.
virtual as_objectcreateClass (Global_as::ASFunction ctor, as_object *prototype)
 Create an ActionScript class.

Protected Member Functions

virtual void markReachableResources () const
 Mark all reachable resources, override from GcResource.
virtual void markReachableResources () const
 Mark all reachable resources, override from GcResource.

Constructor & Destructor Documentation

gnash::AVM1Global::AVM1Global ( VM vm  ) 
gnash::AVM1Global::~AVM1Global (  )  [inline]
gnash::AVM1Global::AVM1Global ( VM vm  ) 
gnash::AVM1Global::~AVM1Global (  )  [inline]

Member Function Documentation

virtual const ClassHierarchy& gnash::AVM1Global::classHierarchy (  )  const [inline, virtual]

Implements gnash::Global_as.

virtual ClassHierarchy& gnash::AVM1Global::classHierarchy (  )  [inline, virtual]

Implements gnash::Global_as.

virtual const ClassHierarchy& gnash::AVM1Global::classHierarchy (  )  const [inline, virtual]

Implements gnash::Global_as.

virtual ClassHierarchy& gnash::AVM1Global::classHierarchy (  )  [inline, virtual]

Implements gnash::Global_as.

virtual as_object* gnash::AVM1Global::createArray (  )  [virtual]

Create an Array object.

This creates an Array object without calling the Array constructor.

Implements gnash::Global_as.

as_object * gnash::AVM1Global::createArray (  )  [virtual]
virtual as_object* gnash::AVM1Global::createBoolean ( bool  b  )  [virtual]

Create a Boolean object.

This calls the Boolean constructor. If that has been changed, this function may not produce a Boolean object. This is generally expected behaviour.

Implements gnash::Global_as.

as_object * gnash::AVM1Global::createBoolean ( bool  b  )  [virtual]

Create a Boolean object.

This calls the Boolean constructor. If that has been changed, this function may not produce a Boolean object. This is generally expected behaviour.

Implements gnash::Global_as.

References gnash::NSV::CLASS_BOOLEAN.

as_object * gnash::AVM1Global::createClass ( Global_as::ASFunction  ctor,
as_object prototype 
) [virtual]

Create an ActionScript class.

An AS2 class is generally a function (the constructor) with a prototype.

Implements gnash::Global_as.

References gnash::as_function::getFunctionConstructor(), gnash::as_object::init_member(), gnash::NSV::PROP_CONSTRUCTOR, and gnash::NSV::PROP_PROTOTYPE.

virtual as_object* gnash::AVM1Global::createClass ( Global_as::ASFunction  ctor,
as_object prototype 
) [virtual]

Create an ActionScript class.

An AS2 class is generally a function (the constructor) with a prototype.

Implements gnash::Global_as.

virtual builtin_function* gnash::AVM1Global::createFunction ( Global_as::ASFunction  function  )  [virtual]

Create an ActionScript function.

Implements gnash::Global_as.

builtin_function * gnash::AVM1Global::createFunction ( Global_as::ASFunction  function  )  [virtual]
as_object * gnash::AVM1Global::createNumber ( double  d  )  [virtual]

Create a Number object.

This calls the Number constructor. If that has been changed, this function may not produce a Number object. This is generally expected behaviour.

Implements gnash::Global_as.

References gnash::NSV::CLASS_NUMBER.

virtual as_object* gnash::AVM1Global::createNumber ( double  d  )  [virtual]

Create a Number object.

This calls the Number constructor. If that has been changed, this function may not produce a Number object. This is generally expected behaviour.

Implements gnash::Global_as.

virtual as_object* gnash::AVM1Global::createObject (  )  [virtual]

Create an Object.

This function returns an Object with Object.prototype as its __proto__ member. It should probably call the Object constructor, but Gnash creates some of its classes on demand. If the Object class has changed before this happens, Gnash's behaviour would differ from the reference player's. TODO: think whether it's better to return the original Object class, a possibly altered one, or allow both.

Implements gnash::Global_as.

as_object * gnash::AVM1Global::createObject (  )  [virtual]

Create an Object.

This function returns an Object with Object.prototype as its __proto__ member. It should probably call the Object constructor, but Gnash creates some of its classes on demand. If the Object class has changed before this happens, Gnash's behaviour would differ from the reference player's. TODO: think whether it's better to return the original Object class, a possibly altered one, or allow both.

Implements gnash::Global_as.

References gnash::as_object::as_object(), and gnash::as_object::set_prototype().

Referenced by createFunction().

virtual as_object* gnash::AVM1Global::createString ( const std::string &  s  )  [virtual]

Create a String object.

This calls the String constructor. If that has been changed, this function may not produce a String object. This is generally expected behaviour.

Implements gnash::Global_as.

as_object * gnash::AVM1Global::createString ( const std::string &  s  )  [virtual]

Create a String object.

This calls the String constructor. If that has been changed, this function may not produce a String object. This is generally expected behaviour.

Implements gnash::Global_as.

References gnash::NSV::CLASS_STRING.

virtual VM& gnash::AVM1Global::getVM (  )  const [inline, virtual]

Implements gnash::Global_as.

References gnash::as_object::vm().

virtual VM& gnash::AVM1Global::getVM (  )  const [inline, virtual]

Implements gnash::Global_as.

References gnash::as_object::vm().

Referenced by registerClasses().

virtual void gnash::AVM1Global::markReachableResources (  )  const [protected, virtual]

Mark all reachable resources, override from GcResource.

The default implementation marks all properties as being reachable, calling markAsObjectReachable().

If a derived class provides access to more GC-managed resources, it should override this method and call markAsObjectReachable() as the last step.

Reimplemented from gnash::as_object.

void gnash::AVM1Global::markReachableResources (  )  const [protected, virtual]

Mark all reachable resources, override from GcResource.

The default implementation marks all properties as being reachable, calling markAsObjectReachable().

If a derived class provides access to more GC-managed resources, it should override this method and call markAsObjectReachable() as the last step.

Reimplemented from gnash::as_object.

References gnash::as_object::markAsObjectReachable(), gnash::ClassHierarchy::markReachableResources(), and gnash::GcResource::setReachable().

void gnash::AVM1Global::registerClasses (  ) 

The documentation for this class was generated from the following files: