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

Untemplated base class for GCStackRoot. More...

#include <GCStackRoot.hpp>

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

List of all members.

Static Public Member Functions

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

Protected Member Functions

 GCStackRootBase (const GCNode *node)
 Primary constructor.
 GCStackRootBase (const GCStackRootBase &source)
 Copy constructor.
GCStackRootBaseoperator= (const GCStackRootBase &source)
void retarget (const GCNode *node)
 Change the node protected by this GCStackRootBase.
const GCNodeptr () const
 Access the encapsulated pointer.

Friends

class GCNode

Detailed Description

Untemplated base class for GCStackRoot.

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

However, GCStackRoot is not usable by C code, which should continue to use PROTECT(), UNPROTECT() etc. as in CR, which are implemented in CXXR via class ProtectStack.


Constructor & Destructor Documentation

CXXR::GCStackRootBase::GCStackRootBase ( const GCNode node)
inlineprotected

Primary constructor.

Parameters:
nodePointer to be encapsulated by the GCStackRootBase.
CXXR::GCStackRootBase::GCStackRootBase ( const GCStackRootBase source)
inlineprotected

Copy constructor.

Parameters:
sourcePattern for the copy.

Member Function Documentation

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

Access the encapsulated pointer.

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

Change the node protected by this GCStackRootBase.

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

Conduct a const visitor to protected objects.

Conduct a GCNode::const_visitor object to each node pointed to by a GCStackRootBase.

Parameters:
vPointer to the const_visitor object.

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