CXXR (C++ R) API
Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
Rinternals.h File Reference

($Id: Rinternals.h 1348 2013-02-25 17:49:03Z arr $)

(As described in 'Writing R Extensions'.) More...

#include <cstdio>
#include <climits>
#include <R_ext/Arith.h>
#include <R_ext/Error.h>
#include <R_ext/Memory.h>
#include <R_ext/PrtUtil.h>
#include <R_ext/Utils.h>
#include <R_ext/libextern.h>
#include "CXXR/Closure.h"
#include "CXXR/ComplexVector.h"
#include "CXXR/DotInternal.h"
#include "CXXR/GCRoot.h"
#include "CXXR/Environment.h"
#include "CXXR/Expression.h"
#include "CXXR/ExpressionVector.h"
#include "CXXR/ExternalPointer.h"
#include "CXXR/IntVector.h"
#include "CXXR/ListVector.h"
#include "CXXR/LogicalVector.h"
#include "CXXR/PairList.h"
#include "CXXR/Promise.h"
#include "CXXR/ProtectStack.h"
#include "CXXR/RawVector.h"
#include "CXXR/RealVector.h"
#include "CXXR/S4Object.h"
#include "CXXR/String.h"
#include "CXXR/StringVector.h"
#include "CXXR/Symbol.h"
#include "CXXR/WeakRef.h"
Include dependency graph for Rinternals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  CXXR
 Namespace for the CXXR project.

Macros

#define NEWSXP   30 /* fresh node creaed in new page */
#define FREESXP   31 /* node released by GC */
#define CHAR(x)   R_CHAR(x)
#define CONS(a, b)   Rf_cons((a), (b)) /* data lists */
#define LCONS(a, b)   Rf_lcons((a), (b)) /* language lists */
#define EXTPTR_PTR(x)   R_ExternalPtrAddr(x)
#define EXTPTR_PROT(x)   R_ExternalPtrProtected(x)
#define EXTPTR_TAG(x)   R_ExternalPtrTag(x)
#define isByteCode(x)   (TYPEOF(x)==BCODESXP)
#define PROTECT(s)   Rf_protect(s)
#define UNPROTECT(n)   Rf_unprotect(n)
#define UNPROTECT_PTR(s)   Rf_unprotect_ptr(s)
#define PROTECT_WITH_INDEX(x, i)   R_ProtectWithIndex(x,i)
#define REPROTECT(x, i)   R_Reprotect(x,i)
#define R_NilValue   NULL
#define NA_STRING   R_NaString
#define error_return(msg)   { Rf_error(msg); return R_NilValue; }
#define errorcall_return(cl, msg)   { Rf_errorcall(cl, msg); return R_NilValue; }
#define BODY_EXPR(e)   R_ClosureExpr(e)
#define R_XDR_DOUBLE_SIZE   8
#define R_XDR_INTEGER_SIZE   4
#define acopy_string   Rf_acopy_string
#define alloc3DArray   Rf_alloc3DArray
#define allocArray   Rf_allocArray
#define allocList   Rf_allocList
#define allocMatrix   Rf_allocMatrix
#define allocS4Object   Rf_allocS4Object
#define allocSExp   Rf_allocSExp
#define allocVector   Rf_allocVector
#define any_duplicated   Rf_any_duplicated
#define any_duplicated3   Rf_any_duplicated3
#define arraySubscript   Rf_arraySubscript
#define asChar   Rf_asChar
#define asCharacterFactor   Rf_asCharacterFactor
#define asComplex   Rf_asComplex
#define asInteger   Rf_asInteger
#define asLogical   Rf_asLogical
#define asReal   Rf_asReal
#define asS4   Rf_asS4
#define classgets   Rf_classgets
#define coerceVector   Rf_coerceVector
#define conformable   Rf_conformable
#define cons   Rf_cons
#define copyMatrix   Rf_copyMatrix
#define copyMostAttrib   Rf_copyMostAttrib
#define copyVector   Rf_copyVector
#define CreateTag   Rf_CreateTag
#define defineVar   Rf_defineVar
#define dimgets   Rf_dimgets
#define dimnamesgets   Rf_dimnamesgets
#define DropDims   Rf_DropDims
#define duplicate   Rf_duplicate
#define duplicated   Rf_duplicated
#define elt   Rf_elt
#define errorcall   Rf_errorcall
#define eval   Rf_eval
#define findFun   Rf_findFun
#define findVar   Rf_findVar
#define findVarInFrame   Rf_findVarInFrame
#define findVarInFrame3   Rf_findVarInFrame3
#define GetArrayDimnames   Rf_GetArrayDimnames
#define getAttrib   Rf_getAttrib
#define getCharCE   Rf_getCharCE
#define GetColNames   Rf_GetColNames
#define GetMatrixDimnames   Rf_GetMatrixDimnames
#define GetOption1   Rf_GetOption1
#define GetOptionDigits   Rf_GetOptionDigits
#define GetOptionWidth   Rf_GetOptionWidth
#define GetOption   Rf_GetOption
#define GetRowNames   Rf_GetRowNames
#define gsetVar   Rf_gsetVar
#define inherits   Rf_inherits
#define install   Rf_install
#define isArray   Rf_isArray
#define isBasicClass   Rf_isBasicClass
#define isComplex   Rf_isComplex
#define isEnvironment   Rf_isEnvironment
#define isExpression   Rf_isExpression
#define isFactor   Rf_isFactor
#define isFrame   Rf_isFrame
#define isFree   Rf_isFree
#define isFunction   Rf_isFunction
#define isInteger   Rf_isInteger
#define isLanguage   Rf_isLanguage
#define isList   Rf_isList
#define isLogical   Rf_isLogical
#define isSymbol   Rf_isSymbol
#define isMatrix   Rf_isMatrix
#define isNewList   Rf_isNewList
#define isNull   Rf_isNull
#define isNumeric   Rf_isNumeric
#define isNumber   Rf_isNumber
#define isObject   Rf_isObject
#define isOrdered   Rf_isOrdered
#define isPairList   Rf_isPairList
#define isPrimitive   Rf_isPrimitive
#define isReal   Rf_isReal
#define isS4   Rf_isS4
#define isString   Rf_isString
#define isTs   Rf_isTs
#define isUnordered   Rf_isUnordered
#define isUnsorted   Rf_isUnsorted
#define isUserBinop   Rf_isUserBinop
#define isValidString   Rf_isValidString
#define isValidStringF   Rf_isValidStringF
#define isVector   Rf_isVector
#define isVectorAtomic   Rf_isVectorAtomic
#define isVectorizable   Rf_isVectorizable
#define isVectorList   Rf_isVectorList
#define lang1   Rf_lang1
#define lang2   Rf_lang2
#define lang3   Rf_lang3
#define lang4   Rf_lang4
#define lang5   Rf_lang5
#define lang6   Rf_lang6
#define lastElt   Rf_lastElt
#define lcons   Rf_lcons
#define lengthgets   Rf_lengthgets
#define list1   Rf_list1
#define list2   Rf_list2
#define list3   Rf_list3
#define list4   Rf_list4
#define list5   Rf_list5
#define listAppend   Rf_listAppend
#define match   Rf_match
#define matchE   Rf_matchE
#define mkChar   Rf_mkChar
#define mkCharCE   Rf_mkCharCE
#define mkCharLen   Rf_mkCharLen
#define mkCharLenCE   Rf_mkCharLenCE
#define mkNamed   Rf_mkNamed
#define mkString   Rf_mkString
#define namesgets   Rf_namesgets
#define ncols   Rf_ncols
#define nlevels   Rf_nlevels
#define NonNullStringMatch   Rf_NonNullStringMatch
#define nrows   Rf_nrows
#define nthcdr   Rf_nthcdr
#define PairToVectorList   Rf_PairToVectorList
#define pmatch   Rf_pmatch
#define psmatch   Rf_psmatch
#define PrintValue   Rf_PrintValue
#define protect   Rf_protect
#define reEnc   Rf_reEnc
#define rownamesgets   Rf_rownamesgets
#define S3Class   Rf_S3Class
#define ScalarComplex   Rf_ScalarComplex
#define ScalarInteger   Rf_ScalarInteger
#define ScalarLogical   Rf_ScalarLogical
#define ScalarReal   Rf_ScalarReal
#define ScalarString   Rf_ScalarString
#define ScalarRaw   Rf_ScalarRaw
#define setAttrib   Rf_setAttrib
#define setSVector   Rf_setSVector
#define setVar   Rf_setVar
#define str2type   Rf_str2type
#define StringBlank   Rf_StringBlank
#define substitute   Rf_substitute
#define translateChar   Rf_translateChar
#define translateChar0   Rf_translateChar0
#define translateCharUTF8   Rf_translateCharUTF8
#define type2char   Rf_type2char
#define type2str   Rf_type2str
#define unprotect   Rf_unprotect
#define unprotect_ptr   Rf_unprotect_ptr
#define VectorToPairList   Rf_VectorToPairList
#define warningcall   Rf_warningcall
#define warningcall_immediate   Rf_warningcall_immediate

Typedefs

typedef void * R_pstream_data_t
typedef struct R_outpstream_st * R_outpstream_t
typedef struct R_inpstream_st * R_inpstream_t

Enumerations

enum  R_pstream_format_t { R_pstream_any_format, R_pstream_ascii_format, R_pstream_binary_format, R_pstream_xdr_format }

Functions

const char *() R_CHAR (SEXP x)
 Access the content of CXXR::String as a C-style string.
Rboolean() Rf_isNull (SEXP s)
 Is this the null object pointer?
Rboolean() Rf_isSymbol (SEXP s)
 Test if SYMSXP.
Rboolean() Rf_isLogical (SEXP s)
Rboolean() Rf_isReal (SEXP s)
Rboolean() Rf_isComplex (SEXP s)
Rboolean() Rf_isExpression (SEXP s)
Rboolean() Rf_isEnvironment (SEXP s)
 Is this a CXXR::Environment?
Rboolean() Rf_isString (SEXP s)
Rboolean() Rf_isObject (SEXP s)
 Does an object have a class attribute?
SEXP() ATTRIB (SEXP x)
Rboolean() OBJECT (SEXP x)
 Does an object have a class attribute?
int() MARK (SEXP x)
SEXPTYPE() TYPEOF (SEXP x)
 Get object's SEXPTYPE.
int() NAMED (SEXP x)
 Get object copying status.
void() SET_NAMED (SEXP x, int v)
 Set object copying status.
void SET_ATTRIB (SEXP x, SEXP v)
void DUPLICATE_ATTRIB (SEXP to, SEXP from)
Rboolean() IS_S4_OBJECT (SEXP x)
 Is this an S4 object?
void() SET_S4_OBJECT (SEXP x)
void() UNSET_S4_OBJECT (SEXP x)
int() LENGTH (SEXP x)
int() TRUELENGTH (SEXP x)
void() SETLENGTH (SEXP x, int v)
void() SET_TRUELENGTH (SEXP x, int v)
int() LEVELS (SEXP x)
 (For use only in serialization.)
int() SETLEVELS (SEXP x, int v)
 (For use only in deserialization.)
int *() LOGICAL (SEXP x)
int *() INTEGER (SEXP x)
Rbyte *() RAW (SEXP x)
double *() REAL (SEXP x)
Rcomplex *() COMPLEX (SEXP x)
SEXP() STRING_ELT (SEXP x, int i)
 Examine element of a CXXR::StringVector.
SEXP() VECTOR_ELT (SEXP x, int i)
 Examine element of CXXR::ListVector.
void SET_STRING_ELT (SEXP x, int i, SEXP v)
SEXP SET_VECTOR_ELT (SEXP x, int i, SEXP v)
SEXP() TAG (SEXP e)
 Get tag of CXXR::ConsCell.
SEXP() CAR (SEXP e)
 Get car of CXXR::ConsCell.
SEXP() CDR (SEXP e)
 Get tail of CXXR::ConsCell.
SEXP() CAAR (SEXP e)
 Equivalent to CAR(CAR(e)).
SEXP() CDAR (SEXP e)
 Equivalent to CDR(CAR(e)).
SEXP() CADR (SEXP e)
 Equivalent to CAR(CDR(e)).
SEXP() CDDR (SEXP e)
 Equivalent to CDR(CDR(e)).
SEXP() CADDR (SEXP e)
 Equivalent to CAR(CDR(CDR(e))).
SEXP() CADDDR (SEXP e)
 Equivalent to CAR(CDR(CDR(CDR(e)))).
SEXP() CAD4R (SEXP e)
 Equivalent to CAR(CDR(CDR(CDR(CDR(e))))).
int() MISSING (SEXP x)
void() SET_MISSING (SEXP x, int v)
void SET_TAG (SEXP x, SEXP y)
SEXP SETCAR (SEXP x, SEXP y)
SEXP SETCDR (SEXP x, SEXP y)
SEXP SETCADR (SEXP x, SEXP y)
SEXP SETCADDR (SEXP x, SEXP y)
SEXP SETCADDDR (SEXP x, SEXP y)
SEXP SETCAD4R (SEXP e, SEXP y)
SEXP() FORMALS (SEXP x)
 Access formal arguments of a CXXR::Closure.
SEXP() BODY (SEXP x)
 Access the body of a CXXR::Closure.
SEXP() CLOENV (SEXP x)
 Access the environment of a CXXR::Closure.
Rboolean() RDEBUG (SEXP x)
 Query debugging status.
int() RSTEP (SEXP x)
int() RTRACE (SEXP x)
 Get function tracing status.
void() SET_RDEBUG (SEXP x, Rboolean v)
void() SET_RSTEP (SEXP x, int v)
void() SET_RTRACE (SEXP x, int v)
 Set function tracing status.
void SET_CLOENV (SEXP x, SEXP v)
 Replace the environment of a closure.
SEXP() PRINTNAME (SEXP x)
 Symbol name.
SEXP() SYMVALUE (SEXP x)
 Symbol's value in the base environment.
SEXP() INTERNAL (SEXP x)
 Get function accessed via .Internal().
Rboolean() DDVAL (SEXP x)
 Does symbol relate to a ... expression?
void() SET_DDVAL (SEXP x, int v)
void SET_PRINTNAME (SEXP x, SEXP v)
void SET_SYMVALUE (SEXP x, SEXP v)
 Set symbol's value in the base environment.
void SET_INTERNAL (SEXP x, SEXP v)
SEXP() FRAME (SEXP x)
 Access an environment's Frame, represented as a PairList.
SEXP() ENCLOS (SEXP x)
 Access enclosing environment.
SEXP() PRCODE (SEXP x)
 Access the expression of a CXXR::Promise.
SEXP() PRENV (SEXP x)
 Access the environment of a CXXR::Promise.
SEXP() PRVALUE (SEXP x)
 Access the value of a CXXR::Promise.
void SET_PRVALUE (SEXP x, SEXP v)
void SET_PRSEEN (SEXP x, int v)
int() HASHVALUE (SEXP x)
SEXP R_GetCurrentSrcref (int)
SEXP R_GetSrcFilename (SEXP)
SEXP Rf_asChar (SEXP)
SEXP Rf_coerceVector (SEXP, SEXPTYPE)
SEXP Rf_PairToVectorList (SEXP x)
SEXP Rf_VectorToPairList (SEXP x)
SEXP Rf_asCharacterFactor (SEXP x)
int Rf_asLogical (SEXP x)
int Rf_asInteger (SEXP x)
double Rf_asReal (SEXP x)
Rcomplex Rf_asComplex (SEXP x)
char * Rf_acopy_string (const char *)
SEXP Rf_alloc3DArray (SEXPTYPE, int, int, int)
SEXP Rf_allocArray (SEXPTYPE, SEXP)
SEXP Rf_allocMatrix (SEXPTYPE, int, int)
SEXP Rf_allocList (unsigned int)
SEXP Rf_allocS4Object (void)
SEXP Rf_allocSExp (SEXPTYPE)
SEXP Rf_allocVector (SEXPTYPE, R_len_t)
int Rf_any_duplicated (SEXP x, Rboolean from_last)
int Rf_any_duplicated3 (SEXP x, SEXP incomp, Rboolean from_last)
SEXP Rf_arraySubscript (int, SEXP, SEXP, SEXP(*)(SEXP, SEXP), SEXP(*)(SEXP, int), SEXP)
SEXP Rf_classgets (SEXP, SEXP)
SEXP Rf_cons (SEXP, SEXP)
void Rf_copyMatrix (SEXP, SEXP, Rboolean)
void Rf_copyMostAttrib (SEXP, SEXP)
void Rf_copyVector (SEXP, SEXP)
SEXP Rf_CreateTag (SEXP)
void Rf_defineVar (SEXP, SEXP, SEXP)
SEXP Rf_dimgets (SEXP, SEXP)
SEXP Rf_dimnamesgets (SEXP, SEXP)
SEXP Rf_DropDims (SEXP)
SEXP Rf_duplicate (SEXP)
SEXP Rf_duplicated (SEXP, Rboolean)
SEXP Rf_eval (SEXP, SEXP)
 Evaluate an object in a specified Environment.
SEXP Rf_findFun (SEXP, SEXP)
SEXP Rf_findVar (SEXP, SEXP)
SEXP Rf_findVarInFrame (SEXP, SEXP)
SEXP Rf_findVarInFrame3 (SEXP, SEXP, Rboolean)
SEXP Rf_getAttrib (SEXP, SEXP)
SEXP Rf_GetArrayDimnames (SEXP)
SEXP Rf_GetColNames (SEXP)
void Rf_GetMatrixDimnames (SEXP, SEXP *, SEXP *, const char **, const char **)
SEXP Rf_GetOption (SEXP, SEXP)
SEXP Rf_GetOption1 (SEXP)
int Rf_GetOptionDigits (void)
int Rf_GetOptionWidth (void)
SEXP Rf_GetRowNames (SEXP)
void Rf_gsetVar (SEXP, SEXP, SEXP)
SEXP Rf_install (const char *)
 Get a pointer to a regular Symbol object.
Rboolean Rf_isFree (SEXP)
Rboolean Rf_isOrdered (SEXP)
Rboolean Rf_isUnordered (SEXP)
Rboolean Rf_isUnsorted (SEXP, Rboolean)
SEXP Rf_lengthgets (SEXP, R_len_t)
SEXP R_lsInternal (SEXP, Rboolean)
SEXP Rf_match (SEXP, SEXP, int)
SEXP Rf_matchE (SEXP, SEXP, int, SEXP)
SEXP Rf_namesgets (SEXP, SEXP)
SEXP Rf_mkChar (const char *)
 Get a pointer to a cached ASCII string object.
SEXP Rf_mkCharLen (const char *, int)
 Create a CXXR::UncachedString object for specified text.
Rboolean Rf_NonNullStringMatch (SEXP, SEXP)
int Rf_ncols (SEXP)
int Rf_nrows (SEXP)
SEXP Rf_nthcdr (SEXP, int)
Rboolean Rf_pmatch (SEXP, SEXP, Rboolean)
Rboolean Rf_psmatch (const char *, const char *, Rboolean)
void Rf_PrintValue (SEXP)
SEXP Rf_protect (SEXP)
 Push a node pointer onto the C pointer protection stack.
SEXP Rf_setAttrib (SEXP, SEXP, SEXP)
void Rf_setSVector (SEXP *, int, SEXP)
void Rf_setVar (SEXP, SEXP, SEXP)
SEXPTYPE Rf_str2type (const char *)
Rboolean Rf_StringBlank (SEXP)
SEXP Rf_substitute (SEXP, SEXP)
const char * Rf_translateChar (SEXP)
const char * Rf_translateChar0 (SEXP)
const char * Rf_translateCharUTF8 (SEXP)
const char * Rf_type2char (SEXPTYPE)
SEXP Rf_type2str (SEXPTYPE)
void Rf_unprotect (int)
 Pop cells from the C pointer protection stack.
void Rf_unprotect_ptr (SEXP)
 Remove entry from pointer protection stack.
void R_ProtectWithIndex (SEXP, PROTECT_INDEX *)
 Push a node pointer onto the C pointer protection stack.
void R_Reprotect (SEXP, PROTECT_INDEX)
 Retarget a cell in the C pointer protection stack.
SEXP R_tryEval (SEXP, SEXP, int *)
SEXP R_tryEvalSilent (SEXP, SEXP, int *)
const char * R_curErrorBuf ()
Rboolean Rf_isS4 (SEXP)
SEXP Rf_asS4 (SEXP, Rboolean, int)
SEXP Rf_S3Class (SEXP)
int Rf_isBasicClass (const char *)
cetype_t Rf_getCharCE (SEXP)
SEXP Rf_mkCharCE (const char *, cetype_t)
 Get a pointer to a cached string object.
SEXP Rf_mkCharLenCE (const char *, int, cetype_t)
const char * Rf_reEnc (const char *x, cetype_t ce_in, cetype_t ce_out, int subst)
SEXP R_MakeExternalPtr (void *p, SEXP tag, SEXP prot)
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_ClearExternalPtr (SEXP s)
 Reset the encapsulated pointer to a null pointer.
void R_SetExternalPtrAddr (SEXP s, void *p)
void R_SetExternalPtrTag (SEXP s, SEXP tag)
void R_SetExternalPtrProtected (SEXP s, SEXP p)
void R_RegisterFinalizer (SEXP s, SEXP fun)
void R_RegisterCFinalizer (SEXP s, R_CFinalizer_t fun)
void R_RegisterFinalizerEx (SEXP s, SEXP fun, Rboolean onexit)
void R_RegisterCFinalizerEx (SEXP s, R_CFinalizer_t fun, Rboolean onexit)
SEXP R_MakeWeakRef (SEXP key, SEXP val, SEXP fin, Rboolean onexit)
SEXP R_MakeWeakRefC (SEXP key, SEXP val, R_CFinalizer_t fin, Rboolean onexit)
SEXP R_WeakRefKey (SEXP w)
SEXP R_WeakRefValue (SEXP w)
void R_RunWeakRefFinalizer (SEXP w)
SEXP R_ClosureExpr (SEXP)
void R_initialize_bcode (void)
Rboolean R_ToplevelExec (void(*fun)(void *), void *data)
void R_RestoreHashCount (SEXP rho)
Rboolean R_IsPackageEnv (SEXP rho)
SEXP R_PackageEnvName (SEXP rho)
SEXP R_FindPackageEnv (SEXP info)
Rboolean R_IsNamespaceEnv (SEXP rho)
SEXP R_NamespaceEnvSpec (SEXP rho)
SEXP R_FindNamespace (SEXP info)
void R_LockEnvironment (SEXP env, Rboolean bindings)
Rboolean R_EnvironmentIsLocked (SEXP env)
void R_LockBinding (SEXP sym, SEXP env)
void R_unLockBinding (SEXP sym, SEXP env)
void R_MakeActiveBinding (SEXP sym, SEXP fun, SEXP env)
Rboolean R_BindingIsLocked (SEXP sym, SEXP env)
Rboolean R_BindingIsActive (SEXP sym, SEXP env)
Rboolean R_HasFancyBindings (SEXP rho)
void Rf_errorcall (SEXP, const char *,...)
void Rf_warningcall (SEXP, const char *,...)
void Rf_warningcall_immediate (SEXP, const char *,...)
void R_XDREncodeDouble (double d, void *buf)
double R_XDRDecodeDouble (void *buf)
void R_XDREncodeInteger (int i, void *buf)
int R_XDRDecodeInteger (void *buf)
void R_InitInPStream (R_inpstream_t stream, R_pstream_data_t data, R_pstream_format_t type, int(*inchar)(R_inpstream_t), void(*inbytes)(R_inpstream_t, void *, int), SEXP(*phook)(SEXP, SEXP), SEXP pdata)
void R_InitOutPStream (R_outpstream_t stream, R_pstream_data_t data, R_pstream_format_t type, int version, void(*outchar)(R_outpstream_t, int), void(*outbytes)(R_outpstream_t, const void *, int), SEXP(*phook)(SEXP, SEXP), SEXP pdata)
void R_InitFileInPStream (R_inpstream_t stream, FILE *fp, R_pstream_format_t type, SEXP(*phook)(SEXP, SEXP), SEXP pdata)
void R_InitFileOutPStream (R_outpstream_t stream, FILE *fp, R_pstream_format_t type, int version, SEXP(*phook)(SEXP, SEXP), SEXP pdata)
void R_Serialize (SEXP s, R_outpstream_t ops)
SEXP R_Unserialize (R_inpstream_t ips)
SEXP R_do_slot (SEXP obj, SEXP name)
SEXP R_do_slot_assign (SEXP obj, SEXP name, SEXP value)
int R_has_slot (SEXP obj, SEXP name)
SEXP R_do_MAKE_CLASS (const char *what)
SEXP R_getClassDef (const char *what)
SEXP R_do_new_object (SEXP class_def)
int R_check_class_and_super (SEXP x, const char **valid, SEXP rho)
int R_check_class_etc (SEXP x, const char **valid)
void R_PreserveObject (SEXP)
void R_ReleaseObject (SEXP)
void R_dot_Last (void)
void R_RunExitFinalizers (void)
int R_system (const char *)
Rboolean R_compute_identical (SEXP, SEXP, int)
Rboolean Rf_conformable (SEXP, SEXP)
SEXP Rf_elt (SEXP, int)
Rboolean Rf_inherits (SEXP, const char *)
Rboolean Rf_isArray (SEXP)
Rboolean Rf_isFactor (SEXP)
Rboolean Rf_isFrame (SEXP)
Rboolean Rf_isFunction (SEXP)
Rboolean Rf_isInteger (SEXP)
Rboolean Rf_isLanguage (SEXP)
Rboolean Rf_isList (SEXP)
Rboolean Rf_isMatrix (SEXP)
Rboolean Rf_isNewList (SEXP)
Rboolean Rf_isNumber (SEXP)
Rboolean Rf_isNumeric (SEXP)
Rboolean Rf_isPairList (SEXP)
Rboolean Rf_isPrimitive (SEXP)
Rboolean Rf_isTs (SEXP)
Rboolean Rf_isUserBinop (SEXP)
Rboolean Rf_isValidString (SEXP)
Rboolean Rf_isValidStringF (SEXP)
Rboolean Rf_isVector (SEXP)
Rboolean Rf_isVectorAtomic (SEXP)
Rboolean Rf_isVectorList (SEXP)
Rboolean Rf_isVectorizable (SEXP)
SEXP Rf_lang1 (SEXP)
SEXP Rf_lang2 (SEXP, SEXP)
SEXP Rf_lang3 (SEXP, SEXP, SEXP)
SEXP Rf_lang4 (SEXP, SEXP, SEXP, SEXP)
SEXP Rf_lang5 (SEXP, SEXP, SEXP, SEXP, SEXP)
SEXP Rf_lang6 (SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)
SEXP Rf_lastElt (SEXP)
SEXP Rf_lcons (SEXP, SEXP)
R_len_t Rf_length (SEXP)
SEXP Rf_list1 (SEXP)
SEXP Rf_list2 (SEXP, SEXP)
SEXP Rf_list3 (SEXP, SEXP, SEXP)
SEXP Rf_list4 (SEXP, SEXP, SEXP, SEXP)
SEXP Rf_list5 (SEXP, SEXP, SEXP, SEXP, SEXP)
SEXP Rf_listAppend (SEXP, SEXP)
SEXP Rf_mkNamed (SEXPTYPE, const char **)
SEXP Rf_mkString (const char *)
int Rf_nlevels (SEXP)
SEXP Rf_ScalarComplex (Rcomplex)
SEXP Rf_ScalarInteger (int)
SEXP Rf_ScalarLogical (int)
SEXP Rf_ScalarRaw (Rbyte)
SEXP Rf_ScalarReal (double)
SEXP Rf_ScalarString (SEXP)
R_len_t CXXR::length (RObject *s)
 Shorthand for Rf_length().

Variables

LibExtern SEXP R_GlobalEnv
LibExtern SEXP R_EmptyEnv
LibExtern SEXP R_BaseEnv
LibExtern SEXP R_BaseNamespace
LibExtern SEXP R_NamespaceRegistry
LibExtern SEXP R_Srcref
LibExtern SEXP R_UnboundValue
LibExtern SEXP R_MissingArg
LibExtern SEXP R_Bracket2Symbol
LibExtern SEXP R_BracketSymbol
LibExtern SEXP R_BraceSymbol
LibExtern SEXP R_ClassSymbol
LibExtern SEXP R_DeviceSymbol
LibExtern SEXP R_DimNamesSymbol
LibExtern SEXP R_DimSymbol
LibExtern SEXP R_DollarSymbol
LibExtern SEXP R_DotsSymbol
LibExtern SEXP R_DropSymbol
LibExtern SEXP R_LastvalueSymbol
LibExtern SEXP R_LevelsSymbol
LibExtern SEXP R_ModeSymbol
LibExtern SEXP R_NameSymbol
LibExtern SEXP R_NamesSymbol
LibExtern SEXP R_NaRmSymbol
LibExtern SEXP R_PackageSymbol
LibExtern SEXP R_QuoteSymbol
LibExtern SEXP R_RowNamesSymbol
LibExtern SEXP R_SeedsSymbol
LibExtern SEXP R_SourceSymbol
LibExtern SEXP R_TspSymbol
LibExtern SEXP R_dot_defined
LibExtern SEXP R_dot_Method
LibExtern SEXP R_dot_target
LibExtern SEXP R_NaString
LibExtern SEXP R_BlankString

Detailed Description

(As described in 'Writing R Extensions'.)

As CXXR development proceeds, the type definitions, function prototypes etc. defined in this header file will be progressively factored out into individual class-related header files, which will be #included back into this 'master' header file. CXXR code should use the class-related header files directly, as required, rather than #includeing this file.

In most cases, function prototypes and extern declarations that have been factored out into CXXR's own header files are nevertheless also retained in this file. This is so that any changes to these declarations that appear in a new release of CR are picked up automatically during the 'svn merge' process. The compiler will then detect any inconsistencies between the new declaration in this file and the 'factored-out' declaration.


Function Documentation

SEXP() BODY ( SEXP  x)
inline

Access the body of a CXXR::Closure.

Parameters:
xPointer to a CXXR::Closure object (checked).
Returns:
Pointer to the body of x.
SEXP() CAR ( SEXP  e)
inline

Get car of CXXR::ConsCell.

Parameters:
ePointer to a CXXR::ConsCell (checked), or a null pointer.
Returns:
Pointer to the value of the list car, or 0 if e is a null pointer.
SEXP() CDR ( SEXP  e)
inline

Get tail of CXXR::ConsCell.

Parameters:
ePointer to a CXXR::ConsCell (checked), or a null pointer.
Returns:
Pointer to the tail of the list, or 0 if e is a null pointer.
SEXP() CLOENV ( SEXP  x)
inline

Access the environment of a CXXR::Closure.

Parameters:
xPointer to a CXXR::Closure object (checked).
Returns:
Pointer to the environment of x.
Rcomplex*() COMPLEX ( SEXP  x)
inline
Parameters:
xPointer to a CXXR::ComplexVector (i.e. an R complex vector). An error is generated if x is not a non-null pointer to a CXXR::ComplexVector .
Returns:
Pointer to element 0 of x .
Rboolean() DDVAL ( SEXP  x)
inline

Does symbol relate to a ... expression?

Parameters:
xPointer to a CXXR::Symbol (checked).
Returns:
TRUE iff this symbol denotes an element of a ... expression.
SEXP() ENCLOS ( SEXP  x)
inline

Access enclosing environment.

Parameters:
xPointer to a CXXR::Environment (checked).
Returns:
Pointer to the enclosing environment of x .
SEXP() FORMALS ( SEXP  x)
inline

Access formal arguments of a CXXR::Closure.

Parameters:
xPointer to a CXXR::Closure object (checked).
Returns:
Pointer to the formal argument list of x.
SEXP() FRAME ( SEXP  x)
inline

Access an environment's Frame, represented as a PairList.

Parameters:
xPointer to a CXXR::Environment (checked).
Returns:
Pointer to a PairList representing the contents of the Frame of x (may be null). This PairList is generated on the fly, so this is a relatively expensive operation. Alterations to the returned PairList will not alter the Environment's Frame.
Note:
Beware that since (unlike CR) this isn't a simple accessor function, its return value will need protection from garbage collection.
int*() INTEGER ( SEXP  x)
inline
Parameters:
xPointer to an IntVector or a LogicalVector (i.e. an R integer or logical vector). An error is generated if x is not a non-null pointer to an IntVector or a LogicalVector .
Returns:
Pointer to element 0 of x .
SEXP() INTERNAL ( SEXP  x)
inline

Get function accessed via .Internal().

Parameters:
xPointer to a CXXR::Symbol (checked).
Returns:
If x is associated with a function invoked in R via .Internal(), then a pointer to the appropriate CXXR::BuiltInFunction, otherwise a null pointer.
Rboolean() IS_S4_OBJECT ( SEXP  x)
inline

Is this an S4 object?

Parameters:
xPointer to CXXR::RObject.
Returns:
true iff x is an S4 object. Returns false if x is 0.
int() LENGTH ( SEXP  x)
inline
Parameters:
xPointer to an CXXR::VectorBase .
Returns:
The length of x, or 0 if x is a null pointer. (In the case of certain hash tables, this means the 'capacity' of x , not all of which may be used.)
int*() LOGICAL ( SEXP  x)
inline
Parameters:
xPointer to a CXXR::LogicalVector (checked).
Returns:
Pointer to element 0 of x .
int() NAMED ( SEXP  x)
inline

Get object copying status.

Parameters:
xPointer to CXXR::RObject.
Returns:
Refer to 'R Internals' document. Returns 0 if x is a null pointer.
Rboolean() OBJECT ( SEXP  x)
inline

Does an object have a class attribute?

Parameters:
xPointer to a CXXR::RObject.
Returns:
true iff x has a class attribute. Returns false if x is 0.
SEXP() PRCODE ( SEXP  x)
inline

Access the expression of a CXXR::Promise.

Parameters:
xPointer to a CXXR::Promise (checked).
Returns:
Pointer to the expression to be evaluated by the CXXR::Promise.
SEXP() PRENV ( SEXP  x)
inline

Access the environment of a CXXR::Promise.

Parameters:
xPointer to a CXXR::Promise (checked).
Returns:
Pointer to the environment in which the CXXR::Promise is to be evaluated. Set to a null pointer when the CXXR::Promise has been evaluated.
SEXP() PRINTNAME ( SEXP  x)
inline

Symbol name.

Parameters:
xPointer to a CXXR::Symbol (checked).
Returns:
Pointer to a CXXR::String representing x's name.
SEXP() PRVALUE ( SEXP  x)
inline

Access the value of a CXXR::Promise.

Parameters:
xPointer to a CXXR::Promise (checked).
Returns:
Pointer to the value of the CXXR::Promise, or to R_UnboundValue if it has not yet been evaluated..
const char*() R_CHAR ( SEXP  x)
inline

Access the content of CXXR::String as a C-style string.

Parameters:
xnon-null pointer to a CXXR::String .
Returns:
const pointer to character 0 of x .
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.
void R_ProtectWithIndex ( SEXP  node,
PROTECT_INDEX *  iptr 
)
inline

Push a node pointer onto the C pointer protection stack.

Push a node pointer onto the C pointer protection stack, and record the index of the resulting stack cell (for subsequent use with R_Reprotect).

Parameters:
nodePointer to the node to be protected from the garbage collector.
iptrPointer to a location in which the stack cell index is to be stored.
void R_Reprotect ( SEXP  node,
PROTECT_INDEX  index 
)
inline

Retarget a cell in the C pointer protection stack.

Change the node that a particular cell in the C pointer protection stack protects. As a consistency check, it is required that the reprotect takes place within the same Context as the original protect. (CR does not apply this check.)

Parameters:
nodePointer to the node now to be protected from the garbage collector by the designated stack cell. (Not necessarily a different node from the one currently protected.)
indexIndex (as returned by R_ProtectWithIndex() ) of the stack cell to be retargeted to node. Must be less than the current size of the C pointer protection stack.

Change the node that a particular cell in the C pointer protection stack protects. As a consistency check, it is required that the reprotect takes place within the same ProtectStack::Scope as the original protect.

Parameters:
nodePointer to the node now to be protected from the garbage collector by the designated stack cell. (Not necessarily a different node from the one currently protected.)
indexIndex (as returned by R_ProtectWithIndex() ) of the stack cell to be retargeted to node. Must be less than the current size of the C pointer protection stack.
Rbyte*() RAW ( SEXP  x)
inline
Parameters:
xPointer to a CXXR::RawVector (i.e. a RAWSXP). An error is generated if x is not a non-null pointer to a CXXR::RawVector .
Returns:
Pointer to element 0 of x .
Rboolean() RDEBUG ( SEXP  x)
inline

Query debugging status.

Parameters:
xPointer to a CXXR::Closure object.
Returns:
true if debugging is set, i.e. evaluations of the function should run under the browser.
Note:
In CXXR, RDEBUG() is applicable only to closures; use ENV_DEBUG() to query the debugging (single-stepping) state for environments.
double*() REAL ( SEXP  x)
inline
Parameters:
xPointer to an RealVector (i.e. an R numeric vector). An error is generated if x is not pointer to an RealVector .
Returns:
Pointer to element 0 of x .
SEXP Rf_eval ( SEXP  e,
SEXP  rho 
)
inline

Evaluate an object in a specified Environment.

Parameters:
ePointer (possibly null) to the object to be evaluated.
rhoPointer to an Environment (checked unless e is null).
Returns:
Pointer to the result of evaluating e in rho, or a null pointer if e is null.
SEXP Rf_install ( const char *  name)
inline

Get a pointer to a regular Symbol object.

If no Symbol with the specified name currently exists, one will be created, and a pointer to it returned. Otherwise a pointer to the existing Symbol will be returned.

Parameters:
nameThe name of the required Symbol (CE_NATIVE encoding is assumed).
Returns:
Pointer to a Symbol (preexisting or newly created) with the required name.
Rboolean() Rf_isComplex ( SEXP  s)
inline
Parameters:
sPointer to an RObject.
Returns:
TRUE iff the RObject pointed to by s is a complex vector.
Rboolean() Rf_isEnvironment ( SEXP  s)
inline

Is this a CXXR::Environment?

Parameters:
sPointer to an RObject.
Returns:
TRUE iff the RObject pointed to by s is an environment.
Rboolean() Rf_isExpression ( SEXP  s)
inline
Parameters:
sPointer to a CXXR::RObject.
Returns:
TRUE iff the CXXR::RObject pointed to by s is an expression.
Rboolean() Rf_isLogical ( SEXP  s)
inline
Parameters:
sPointer to a CXXR::RObject.
Returns:
TRUE iff the CXXR::RObject pointed to by s is a logical vector.
Rboolean() Rf_isNull ( SEXP  s)
inline

Is this the null object pointer?

Parameters:
sPointer to a CXXR::RObject.
Returns:
TRUE iff the CXXR::RObject pointed to by s is either a null pointer (i.e. == R_NilValue in CXXR), or is a CXXR::RObject with SEXPTYPE NILSXP (should not happen in CXXR).
Rboolean() Rf_isObject ( SEXP  s)
inline

Does an object have a class attribute?

Parameters:
sPointer to a CXXR::RObject.
Returns:
TRUE iff the CXXR::RObject pointed to by s has a class attribute.
Rboolean() Rf_isReal ( SEXP  s)
inline
Parameters:
sPointer to an RObject.
Returns:
TRUE iff the RObject pointed to by s is a real vector.
Rboolean() Rf_isString ( SEXP  s)
inline
Parameters:
sPointer to an RObject.
Returns:
TRUE iff the RObject pointed to by s is a vector of strings.
Rboolean() Rf_isSymbol ( SEXP  s)
inline

Test if SYMSXP.

Parameters:
sPointer to a CXXR::RObject.
Returns:
TRUE iff s points to a CXXR::RObject with SEXPTYPE SYMSXP.
SEXP Rf_mkChar ( const char *  str)
inline

Get a pointer to a cached ASCII string object.

If no cached string with the specified text currently exists, one will be created. Otherwise a pointer to the existing cached string will be returned.

Parameters:
strThe text of the required cached string.
Returns:
Pointer to a string object representing the specified text.

Get a pointer to a cached ASCII string object.

CE_NATIVE encoding is assumed. If no CXXR::String with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing CXXR::String will be returned.

Parameters:
strThe null-terminated text of the required string.
Returns:
Pointer to a string object representing the specified text.
SEXP Rf_mkCharCE ( const char *  str,
cetype_t  encoding 
)
inline

Get a pointer to a cached string object.

If no cached string with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing cached string will be returned.

Parameters:
strThe text of the required cached string.
encodingThe encoding of the required CachedString. Only CE_NATIVE, CE_UTF8 or CE_LATIN1 are permitted in this context (checked).
Returns:
Pointer to a string object representing the specified text in the specified encoding.

Get a pointer to a cached string object.

If no CXXR::String with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing CXXR::String will be returned.

Parameters:
strThe null-terminated text of the required cached string.
encodingThe encoding of the required String. Only CE_NATIVE, CE_UTF8 or CE_LATIN1 are permitted in this context (checked).
Returns:
Pointer to a string object representing the specified text in the specified encoding.
SEXP Rf_mkCharLen ( const char *  text,
int  length 
)
inline

Create a CXXR::UncachedString object for specified text.

Parameters:
textThe text of the string to be created, possibly including embedded null characters. The encoding is assumed to be CE_NATIVE.
lengthThe length of the string pointed to by text. Must be nonnegative. The created string will comprise the text plus an appended null byte.
Returns:
Pointer to the created string.

Create a CXXR::UncachedString object for specified text.

CE_NATIVE encoding is assumed. If no CXXR::String with the specified text and encoding currently exists, one will be created. Otherwise a pointer to the existing CXXR::String will be returned.

Parameters:
textThe text of the string to be created, possibly including embedded null characters. The encoding is assumed to be CE_NATIVE.
lengthThe length of the string pointed to by text. Must be nonnegative. The created string will comprise the text plus an appended null byte.
Returns:
Pointer to the created string.
SEXP Rf_protect ( SEXP  node)
inline

Push a node pointer onto the C pointer protection stack.

Parameters:
nodePointer to the node to be protected from the garbage collector.
Returns:
a copy of node .
void Rf_unprotect ( int  count)
inline

Pop cells from the C pointer protection stack.

As a consistency check, it is required that the unprotect takes place within the same Context as the corresponding protect. (CR does not apply this check.)

Parameters:
countNumber of cells to be popped. Must not be larger than the current size of the C pointer protection stack.

As a consistency check, it is required that the unprotect takes place within the same ProtectStack::Scope as the corresponding protects.

Parameters:
countNumber of cells to be popped. Must not be larger than the current size of the C pointer protection stack.
void Rf_unprotect_ptr ( SEXP  node)
inline

Remove entry from pointer protection stack.

Removes from the C pointer protection stack the uppermost stack cell containing a pointer to a specified node, and drops all the stack cells above it by one place.

Parameters:
nodePointer to the node whose cell is to be removed from the C pointer protection stack.
Deprecated:
Utterly.

Removes from the C pointer protection stack the uppermost stack cell containing a pointer to a specified node, and drops all the stack cells above it by one place.

Parameters:
nodePointer to the node whose cell is to be removed from the C pointer protection stack.
Deprecated:
Utterly.
int() RTRACE ( SEXP  x)
inline

Get function tracing status.

Parameters:
xPointer to a CXXR::FunctionBase (checked), or a null pointer.
Returns:
Refer to 'R Internals' document. Returns 0 if x is a null pointer.
void SET_CLOENV ( SEXP  x,
SEXP  v 
)
inline

Replace the environment of a closure.

Parameters:
xPointer to a CXXR::Closure object (checked).
vPointer to the environment now to be considered as the environment of this CXXR::Closure. A null pointer is not permissible (not checked).
void() SET_NAMED ( SEXP  x,
int  v 
)
inline

Set object copying status.

Parameters:
xPointer to CXXR::RObject. The function does nothing if x is a null pointer.
vRefer to 'R Internals' document.
Deprecated:
Ought to be private.
void() SET_RDEBUG ( SEXP  x,
Rboolean  v 
)
inline

Set the debugging state of a CXXR::Closure object.

Parameters:
xPointer a CXXR::Closure object (checked).
vThe new debugging state.
Note:
In CXXR, SET_RDEBUG() is applicable only to closures; use SET_ENV_DEBUG() to set the debugging (single-stepping) state for environments.
void() SET_RTRACE ( SEXP  x,
int  v 
)
inline

Set function tracing status.

Parameters:
xPointer to a CXXR::FunctionBase (checked), or a null pointer.
vThe desired tracing status: non-zero if tracing is required.
void() SET_S4_OBJECT ( SEXP  x)
inline
Deprecated:
Ought to be private.
void SET_SYMVALUE ( SEXP  x,
SEXP  val 
)
inline

Set symbol's value in the base environment.

Parameters:
xPointer to a CXXR::Symbol (checked).
valPointer to the RObject now to be considered as the value of this symbol. A null pointer or R_UnboundValue are permissible values of val.
Todo:
No binding to R_UnboundValue ought to be created.
void() SET_TRUELENGTH ( SEXP  x,
int  v 
)
inline

Set 'true length' of vector.

Parameters:
xPointer to a CXXR::VectorBase .
vThe required new 'true length'.
Deprecated:
May be withdrawn in the future.
SEXP() STRING_ELT ( SEXP  x,
int  i 
)
inline

Examine element of a CXXR::StringVector.

Parameters:
xNon-null pointer to a CXXR::StringVector. An error is raised if x is not a pointer to a CXXR::StringVector.
iIndex of the required element. There is no bounds checking.
Returns:
Pointer to extracted i 'th element.
SEXP() SYMVALUE ( SEXP  x)
inline

Symbol's value in the base environment.

Parameters:
xPointer to a CXXR::Symbol (checked).
Returns:
Pointer to a CXXR::RObject representings x's value. Returns R_UnboundValue if no value is currently associated with the Symbol.
SEXP() TAG ( SEXP  e)
inline

Get tag of CXXR::ConsCell.

Parameters:
ePointer to a CXXR::ConsCell (checked), or a null pointer.
Returns:
Pointer to the tag of the list element, or 0 if e is a null pointer.
int() TRUELENGTH ( SEXP  x)
inline
Parameters:
xPointer to a CXXR::VectorBase .
Returns:
The 'true length' of x. According to the R Internals document for R 2.4.1, this is only used for certain hash tables, and signifies the number of used slots in the table.
Deprecated:
May be withdrawn in the future.
SEXPTYPE() TYPEOF ( SEXP  x)
inline

Get object's SEXPTYPE.

Parameters:
xPointer to CXXR::RObject.
Returns:
SEXPTYPE of x, or NILSXP if x is a null pointer.
void() UNSET_S4_OBJECT ( SEXP  x)
inline
Deprecated:
Ought to be private.
SEXP() VECTOR_ELT ( SEXP  x,
int  i 
)
inline

Examine element of CXXR::ListVector.

Parameters:
xNon-null pointer to a CXXR::ListVector .
iIndex of the required element. There is no bounds checking.
Returns:
The value of the i 'th element.