Gnash
0.8.10
|
A native type that requires periodic updates from the core (movie_root). More...
#include <Relay.h>
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_object & | owner () 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. |
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.
gnash::ActiveRelay::ActiveRelay | ( | as_object * | owner | ) | [inline, explicit] |
gnash::ActiveRelay::~ActiveRelay | ( | ) | [virtual] |
Make sure we are removed from the list of callbacks on destruction.
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] |
Return the as_object that this Relay is attached to.
Referenced by gnash::NetConnection_as::markReachableResources(), gnash::NetConnection_as::validateURL(), gnash::NetConnection_as::notifyStatus(), gnash::NetConnection_as::connect(), gnash::NetConnection_as::setURI(), gnash::NetConnection_as::getStream(), gnash::NetStream_as::setAudioController(), and gnash::NetStream_as::update().
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.