CXXR (C++ R)
Namespaces | Functions | Variables
ExternalPointer.cpp File Reference

($Id: ExternalPointer.cpp 1351 2013-03-08 15:12:28Z arr $)

Class CXXR::ExternalPointer and associated C interface. More...

#include "CXXR/ExternalPointer.h"
#include "localization.h"
#include "CXXR/GCStackRoot.hpp"
#include "CXXR/PairList.h"
Include dependency graph for ExternalPointer.cpp:

Namespaces

namespace  CXXR
 Namespace for the CXXR project.

Functions

SEXP R_MakeExternalPtr (void *p, SEXP tag, SEXP prot)
 Create a CXXR::ExternalPointer object.
void R_SetExternalPtrAddr (SEXP s, void *p)
 Set the value of the encapsulated pointer.
void R_SetExternalPtrTag (SEXP s, SEXP tag)
 Designate the tag object.
void R_SetExternalPtrProtected (SEXP s, SEXP p)
 Designate the protege object.

Variables

void *(* CXXR::ForceNonInline::R_ExternalPtrAddrp )(SEXP) = R_ExternalPtrAddr
RObject *(* CXXR::ForceNonInline::R_ExternalPtrTagp )(SEXP) = R_ExternalPtrTag
RObject *(* CXXR::ForceNonInline::R_ExternalPtrProtectedp )(SEXP) = R_ExternalPtrProtected
void(* CXXR::ForceNonInline::R_ClearExternalPtrp )(SEXP) = R_ClearExternalPtr

Detailed Description

Class CXXR::ExternalPointer and associated C interface.


Function Documentation

SEXP R_MakeExternalPtr ( void *  p,
SEXP  tag,
SEXP  prot 
)

Create a CXXR::ExternalPointer object.

Parameters:
pThe pointer that the CXXR::ExternalPointer object is to encapsulate.
tagPointer to the tag object. May be null (and often is).
protPointer to the protege object. May be null (and often is).
Returns:
Pointer to the created CXXR::ExternalPointer object.
void R_SetExternalPtrAddr ( SEXP  s,
void *  p 
)

Set the value of the encapsulated pointer.

Parameters:
sPointer to a CXXR::ExternalPointer (checked).
pNew pointer value (may be null).
void R_SetExternalPtrProtected ( SEXP  s,
SEXP  p 
)

Designate the protege object.

Parameters:
sPointer to a CXXR::ExternalPointer (checked).
pPointer to the new protege object (or a null pointer).
void R_SetExternalPtrTag ( SEXP  s,
SEXP  tag 
)

Designate the tag object.

Parameters:
sPointer to a CXXR::ExternalPointer (checked).
tagPointer to the new tag object (or a null pointer).