CXXR (C++ R)
Static Public Member Functions | Protected Member Functions | Friends
CXXR::GCRootBase Class Reference

Untemplated base class for GCRoot. More...

#include <GCRoot.h>

Inheritance diagram for CXXR::GCRootBase:
Inheritance graph
[legend]

List of all members.

Static Public Member Functions

static void visitRoots (GCNode::const_visitor *v)
 Conduct a const visitor to all 'root' GCNode objects.

Protected Member Functions

 GCRootBase (const GCNode *node)
 Primary constructor.
 GCRootBase (const GCRootBase &source)
 Copy constructor.
GCRootBaseoperator= (const GCRootBase &source)
void redirect (const GCNode *node)
 Change the node protected by this GCRootBase.
const GCNodeptr () const
 Access the encapsulated pointer.

Friends

class GCNode

Detailed Description

Untemplated base class for GCRoot.

The preferred method for C++ code to protect a GCNode from the garbage collector is to use the templated class GCRoot, of which this is the untemplated base class, or class GCStackRoot.


Constructor & Destructor Documentation

GCRootBase::GCRootBase ( const GCNode node)
protected

Primary constructor.

Parameters:
nodePointer, possibly null, to the node to be protected.
CXXR::GCRootBase::GCRootBase ( const GCRootBase source)
inlineprotected

Copy constructor.

Parameters:
sourcePattern for the copy.

Member Function Documentation

const GCNode* CXXR::GCRootBase::ptr ( ) const
inlineprotected

Access the encapsulated pointer.

Returns:
the GCNode pointer encapsulated by this object.
void CXXR::GCRootBase::redirect ( const GCNode node)
inlineprotected

Change the node protected by this GCRootBase.

Parameters:
nodePointer to the node now to be protected, or a null pointer.
void GCRootBase::visitRoots ( GCNode::const_visitor v)
static

Conduct a const visitor to all 'root' GCNode objects.

Conduct a GCNode::const_visitor object to each root GCNode and each node on the C pointer protection stack.

Parameters:
vPointer to the const_visitor object.

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