Gnash  0.8.10
Public Member Functions | Protected Member Functions
gnash::ActiveRelay Class Reference

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

List of all members.

Public Member Functions

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

Protected Member Functions

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

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

gnash::ActiveRelay::ActiveRelay ( as_object owner) [inline, explicit]
gnash::ActiveRelay::~ActiveRelay ( ) [virtual]

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


Member Function Documentation

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().

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

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().

as_object& gnash::ActiveRelay::owner ( ) const [inline]
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::movie_root::markReachableResources(), gnash::NetStream_as::markReachableResources(), and gnash::Video::markOwnResources().

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

ActiveRelay objects must have an advanceState method.

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


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