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

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

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

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

Namespaces

namespace  CXXR
 Namespace for the CXXR project.

Functions

SEXP Rf_allocList (unsigned int n)
 Create a CXXR::PairList of a specified length.
SEXP Rf_cons (SEXP cr, SEXP tl)
 Creates a CXXR::PairList with a specified car and tail.
Rboolean IS_ACTIVE_BINDING (SEXP b)
 Is a Binding active?
SEXP SETCDR (SEXP x, SEXP y)
 Replace the tail of a CXXR::ConsCell.
SEXP SETCADR (SEXP x, SEXP y)
 Set the 'car' value of the second element of list.
SEXP SETCADDR (SEXP x, SEXP y)
 Set the 'car' value of the third element of list.
SEXP SETCADDDR (SEXP x, SEXP y)
 Set the 'car' value of the fourth element of list.
SEXP SETCAD4R (SEXP x, SEXP y)
 Set the 'car' value of the fifth element of list.

Variables

Rboolean(* CXXR::ForceNonInline::BINDING_IS_LOCKEDptr )(SEXP b) = BINDING_IS_LOCKED
SEXP(* CXXR::ForceNonInline::CAD4Rp )(SEXP e) = CAD4R
SEXP(* CXXR::ForceNonInline::CADDDRp )(SEXP e) = CADDDR
SEXP(* CXXR::ForceNonInline::CADDRp )(SEXP e) = CADDR
SEXP(* CXXR::ForceNonInline::CADRp )(SEXP e) = CADR
SEXP(* CXXR::ForceNonInline::CDARp )(SEXP e) = CDAR
SEXP(* CXXR::ForceNonInline::CDDRp )(SEXP e) = CDDR
SEXP(* CXXR::ForceNonInline::CDRp )(SEXP e) = CDR
Rboolean(* CXXR::ForceNonInline::IS_ACTIVE_BINDINGptr )(SEXP b) = IS_ACTIVE_BINDING
void(* CXXR::ForceNonInline::LOCK_BINDINGptr )(SEXP b) = LOCK_BINDING
void(* CXXR::ForceNonInline::SET_ACTIVE_BINDING_BITptr )(SEXP b) = SET_ACTIVE_BINDING_BIT
void(* CXXR::ForceNonInline::UNLOCK_BINDINGptr )(SEXP b) = UNLOCK_BINDING

Detailed Description

Class CXXR::PairList and associated C interface.


Function Documentation

Rboolean IS_ACTIVE_BINDING ( SEXP  b)

Is a Binding active?

Parameters:
bPointer to a ConsCell object (checked). If b points to any type of ConsCell other than a PairList, the function returns FALSE. Otherwise b should point to a PairList object representing a Frame::Binding (e.g. because it was produced using Frame::asPairList() ).
Returns:
true iff this is an active Binding.
SEXP Rf_allocList ( unsigned int  n)

Create a CXXR::PairList of a specified length.

This constructor creates a CXXR::PairList with a specified number of elements. On creation, each element has null 'car' and 'tag'.

Parameters:
nNumber of elements required in the list.
Returns:
The constructed list, or a null pointer if n is zero.
SEXP Rf_cons ( SEXP  cr,
SEXP  tl 
)

Creates a CXXR::PairList with a specified car and tail.

This function protects its arguments from the garbage collector.

Parameters:
crPointer to the 'car' of the element to be created.
tlPointer to the 'tail' of the element to be created, which must be of a CXXR::PairList type (checked).
Returns:
Pointer to the constructed list.
SEXP SETCAD4R ( SEXP  x,
SEXP  y 
)

Set the 'car' value of the fifth element of list.

Parameters:
xPointer to a CXXR::ConsCell with at least four successors (checked).
yPointer a CXXR::RObject representing the new value of the fifth element of the list.
Returns:
y.
SEXP SETCADDDR ( SEXP  x,
SEXP  y 
)

Set the 'car' value of the fourth element of list.

Parameters:
xPointer to a CXXR::ConsCell with at least three successors (checked).
yPointer a CXXR::RObject representing the new value of the fourth element of the list.
Returns:
y.
SEXP SETCADDR ( SEXP  x,
SEXP  y 
)

Set the 'car' value of the third element of list.

Parameters:
xPointer to a CXXR::ConsCell with at least two successors (checked).
yPointer a CXXR::RObject representing the new value of the third element of the list.
Returns:
y.
SEXP SETCADR ( SEXP  x,
SEXP  y 
)

Set the 'car' value of the second element of list.

Parameters:
xPointer to a CXXR::ConsCell with at least one successor (checked).
yPointer a CXXR::RObject representing the new value of the second element of the list.
Returns:
y.
SEXP SETCDR ( SEXP  x,
SEXP  y 
)

Replace the tail of a CXXR::ConsCell.

Parameters:
xPointer to a CXXR::ConsCell (checked).
yPointer a CXXR::RObject representing the new tail of the list.
Returns:
y.