CXXR (C++ R) API
Classes | Namespaces | Functions
ExternalPointer.h File Reference

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

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

#include "CXXR/RObject.h"
#include <boost/serialization/access.hpp>
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/nvp.hpp>
#include "CXXR/SEXP_downcast.hpp"
Include dependency graph for ExternalPointer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CXXR::ExternalPointer
 External pointer. More...

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_ExternalPtrAddr (SEXP s)
 Get the encapsulated external pointer.
SEXP R_ExternalPtrTag (SEXP s)
 Get pointer to tag object.
SEXP R_ExternalPtrProtected (SEXP s)
 Get pointer to protege object.
void R_SetExternalPtrAddr (SEXP s, void *p)
 Set the value of the encapsulated pointer.
void R_ClearExternalPtr (SEXP s)
 Reset the encapsulated pointer to a null pointer.
void R_SetExternalPtrTag (SEXP s, SEXP tag)
 Designate the tag object.
void R_SetExternalPtrProtected (SEXP s, SEXP p)
 Designate the protege object.

Detailed Description

Class CXXR::ExternalPointer and associated C interface.


Function Documentation

void R_ClearExternalPtr ( SEXP  s)
inline

Reset the encapsulated pointer to a null pointer.

Parameters:
sPointer to a CXXR::ExternalPointer (checked).
void* R_ExternalPtrAddr ( SEXP  s)
inline

Get the encapsulated external pointer.

Parameters:
sPointer to a CXXR::ExternalPointer (checked).
Returns:
the external pointer encapsulated by s.
SEXP R_ExternalPtrProtected ( SEXP  s)
inline

Get pointer to protege object.

Parameters:
sPointer to a CXXR::ExternalPointer (checked).
Returns:
a pointer to the protege object of s.
SEXP R_ExternalPtrTag ( SEXP  s)
inline

Get pointer to tag object.

Parameters:
sPointer to a CXXR::ExternalPointer (checked).
Returns:
a pointer to the tag object of s.
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).