Gnash  0.8.11dev
Public Member Functions | Protected Member Functions | List of all members
gnash::ActiveRelay Class Referenceabstract

A native type that requires periodic updates from the core (movie_root). More...

#include <Relay.h>

Inheritance diagram for gnash::ActiveRelay:
gnash::Relay gnash::NetConnection_as gnash::NetStream_as

Public Member Functions

 ActiveRelay (as_object *owner)
 
virtual ~ActiveRelay ()
 Make sure we are removed from the list of callbacks on destruction. More...
 
virtual void update ()=0
 ActiveRelay objects must have an update() method. More...
 
virtual void setReachable ()
 Mark any other reachable resources, and finally mark our owner. More...
 
virtual void clean ()
 Remove the ActiveRelay from movie_root's callback set. More...
 
as_objectowner () const
 Return the as_object that this Relay is attached to. More...
 
- Public Member Functions inherited from gnash::Relay
virtual ~Relay ()=0
 

Protected Member Functions

virtual void markReachableResources () const
 Mark any reachable resources other than the owner. More...
 

Detailed Description

A native type that requires periodic updates from the core (movie_root).

Objects with this type of relay can be registered with movie_root, and recieve a callback on every advance. This type of Relay holds a reference to its parent as_object (owner). If a reference to this ActiveRelay is held by another object, it must be marked reachable so that its owner is not deleted by the GC. The function setReachable() is called on every GC run. It calls markReachableResources() and marks its owner.

Constructor & Destructor Documentation

§ ActiveRelay()

gnash::ActiveRelay::ActiveRelay ( as_object owner)
inlineexplicit

§ ~ActiveRelay()

gnash::ActiveRelay::~ActiveRelay ( )
virtual

Make sure we are removed from the list of callbacks on destruction.

Member Function Documentation

§ clean()

void gnash::ActiveRelay::clean ( )
virtual

Remove the ActiveRelay from movie_root's callback set.

This must be called before the Relay is destroyed!

Reimplemented from gnash::Relay.

References gnash::getRoot(), and gnash::movie_root::removeAdvanceCallback().

§ markReachableResources()

virtual void gnash::ActiveRelay::markReachableResources ( ) const
inlineprotectedvirtual

Mark any reachable resources other than the owner.

Override this function if the subclass holds references to GC resources other than the owner.

Reimplemented in gnash::NetStream_as, and gnash::NetConnection_as.

Referenced by setReachable().

§ owner()

as_object& gnash::ActiveRelay::owner ( ) const
inline

§ setReachable()

void gnash::ActiveRelay::setReachable ( )
virtual

Mark any other reachable resources, and finally mark our owner.

Do not override this function.

Reimplemented from gnash::Relay.

References markReachableResources(), and gnash::GcResource::setReachable().

Referenced by gnash::Video::markOwnResources(), gnash::NetStream_as::markReachableResources(), and gnash::movie_root::markReachableResources().

§ update()

virtual void gnash::ActiveRelay::update ( )
pure virtual

ActiveRelay objects must have an update() method.

The method will be called at the heart-beat frequency.

Implemented in gnash::NetStream_as, and gnash::NetConnection_as.


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