CXXR (C++ R) API
Functions
PairList.h File Reference

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

C interface of class PairList. More...

#include "CXXR/ConsCell.h"
Include dependency graph for PairList.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

unsigned char ARGUSED (SEXP x)
void SET_ARGUSED (SEXP x, unsigned char v)
Rboolean BINDING_IS_LOCKED (SEXP b)
 Is a Binding locked?
SEXP CDR (SEXP e)
 Get tail of CXXR::ConsCell.
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))))).
Rboolean IS_ACTIVE_BINDING (SEXP b)
 Is a Binding active?
void LOCK_BINDING (SEXP b)
 Lock the binding represented by a PairList object.
void SET_ACTIVE_BINDING_BIT (SEXP b)
 Designate as active the binding represented by a PairList object.
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.
void UNLOCK_BINDING (SEXP b)
 Unlock the binding represented by a PairList object.
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.

Detailed Description

C interface of class PairList.

To facilitate inlining of various ConsCell member functions, the definition of class CXXR::PairList itself is in ConsCell.h.

This file includes C functions for examining and setting the CDR of a CXXR::ConsCell, and other operations accessing the tail of the list; functions for examining and setting the CAR and TAG of a CXXR:ConsCell are to be found in ConsCell.h.


Function Documentation

Rboolean BINDING_IS_LOCKED ( SEXP  b)
inline

Is a Binding locked?

Parameters:
bPointer to a PairList object (checked) representing a Frame::Binding (e.g. because it was produced using Frame::asPairList() ).
Returns:
true iff this Binding is locked.
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.
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.
void LOCK_BINDING ( SEXP  b)
inline

Lock the binding represented by a PairList object.

Parameters:
bPointer to a PairList object (checked) representing a Frame::Binding (e.g. because it was produced using Frame::asPairList() ).
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.
void SET_ACTIVE_BINDING_BIT ( SEXP  b)
inline

Designate as active the binding represented by a PairList object.

Parameters:
bPointer to a PairList object (checked) representing a Frame::Binding (e.g. because it was produced using Frame::asPairList() ).
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.
void UNLOCK_BINDING ( SEXP  b)
inline

Unlock the binding represented by a PairList object.

Parameters:
bPointer to a PairList object (checked) representing a Frame::Binding (e.g. because it was produced using Frame::asPairList() ).