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:
Inheritance graph
[legend]
Collaboration diagram for gnash::ActiveRelay:
Collaboration graph
[legend]

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

Destructor of ActiveRelay needs definition of movie_root.

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


Member Function Documentation

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::NetConnection_as, and gnash::NetStream_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::NetStream_as::markReachableResources().

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

ActiveRelay objects must have an advanceState method.

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


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