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

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

#include "CXXR/RObject.h"
#include <cstdlib>
#include <iostream>
#include "localization.h"
#include "R_ext/Error.h"
#include "CXXR/GCStackRoot.hpp"
#include "CXXR/PairList.h"
#include "CXXR/Symbol.h"
Include dependency graph for RObject.cpp:

Namespaces

namespace  CXXR
 Namespace for the CXXR project.

Functions

SEXP ATTRIB (SEXP x)
 Get the attributes of a CXXR::RObject.
void DUPLICATE_ATTRIB (SEXP to, SEXP from)
 Replace the attributes of to by those of from.
void SET_ATTRIB (SEXP x, SEXP v)
 Replace an object's attributes.
void maybeTraceMemory1 (SEXP dest, SEXP src)
 C interface to RObject::traceMemory().
void maybeTraceMemory2 (SEXP dest, SEXP src1, SEXP src2)
 C interface to RObject::traceMemory().

Variables

void(* CXXR::ForceNonInline::DUPLICATE_ATTRIBptr )(SEXP, SEXP) = DUPLICATE_ATTRIB
Rboolean(* CXXR::ForceNonInline::isNullptr )(SEXP s) = Rf_isNull
Rboolean(* CXXR::ForceNonInline::isObjectptr )(SEXP s) = Rf_isObject
Rboolean(* CXXR::ForceNonInline::IS_S4_OBJECTptr )(SEXP x) = IS_S4_OBJECT
int(* CXXR::ForceNonInline::NAMEDptr )(SEXP x) = NAMED
Rboolean(* CXXR::ForceNonInline::OBJECTptr )(SEXP e) = OBJECT
void(* CXXR::ForceNonInline::SET_NAMEDptr )(SEXP x, int v) = SET_NAMED
void(* CXXR::ForceNonInline::SET_S4_OBJECTptr )(SEXP x) = SET_S4_OBJECT
SEXPTYPE(* CXXR::ForceNonInline::TYPEOFptr )(SEXP e) = TYPEOF
void(* CXXR::ForceNonInline::UNSET_S4_OBJECTptr )(SEXP x) = UNSET_S4_OBJECT

Detailed Description

Class RObject and associated C interface functions.


Function Documentation

SEXP ATTRIB ( SEXP  x)

Get the attributes of a CXXR::RObject.

Parameters:
xPointer to the CXXR::RObject whose attributes are required.
Returns:
Pointer to the attributes object of x , or 0 if x is a null pointer.
void DUPLICATE_ATTRIB ( SEXP  to,
SEXP  from 
)

Replace the attributes of to by those of from.

The status of to as an S4 Object is also copied from from .

Parameters:
toPointer to CXXR::RObject.
fromPointer to another CXXR::RObject.
void maybeTraceMemory1 ( SEXP  dest,
SEXP  src 
)

C interface to RObject::traceMemory().

This function provides a C language interface to dest->maybeTraceMemory(src): see the documentation of that method for details.

Parameters:
destNon-null pointer to an RObject.
srcNon-null pointer to an RObject.
void maybeTraceMemory2 ( SEXP  dest,
SEXP  src1,
SEXP  src2 
)

C interface to RObject::traceMemory().

This function provides a C language interface to dest->maybeTraceMemory(src1, src2): see the documentation of that method for details.

Parameters:
destNon-null pointer to an RObject.
src1Non-null pointer to an RObject.
src2Non-null pointer to an RObject.
void SET_ATTRIB ( SEXP  x,
SEXP  v 
)

Replace an object's attributes.

Parameters:
xPointer to a CXXR::RObject.
vPointer to a PairList giving the new attributes of x. x should be considered to assume ownership of the 'car' values in v ; they should therefore not be subsequently altered externally.
Note:
Unlike CR, v isn't simply plugged into the attributes field of x : refer to the documentation for RObject::setAttributes() . In particular, do not attempt to modify the attributes by changing v after SET_ATTRIB has been called.
For compatibility with CR, garbage collection is inhibited within this function.