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

($Id: ConsCell.h 1353 2013-03-18 16:59:38Z arr $)

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

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

Go to the source code of this file.

Classes

class  CXXR::ConsCell
 Element of a singly linked list. More...
class  CXXR::ConsCell::iterator
 iterator for iterating over a HeterogeneousList. More...
class  CXXR::ConsCell::const_iterator
 const_iterator for iterating over a ConsCell list. More...
class  CXXR::PairList
 Singly linked list of pairs. More...

Namespaces

namespace  CXXR
 Namespace for the CXXR project.

Functions

bool CXXR::operator== (ConsCell::iterator l, ConsCell::iterator r)
bool CXXR::operator!= (ConsCell::iterator l, ConsCell::iterator r)
bool CXXR::operator== (ConsCell::const_iterator l, ConsCell::const_iterator r)
bool CXXR::operator!= (ConsCell::const_iterator l, ConsCell::const_iterator r)
RObjectCXXR::car0 (ConsCell *cc)
 cc ? cc->car() : 0
void CXXR::ccdump (std::ostream &os, const ConsCell &cc, size_t margin=0)
 (For debugging.)
size_t CXXR::listLength (const ConsCell *start)
 Number of elements in list.
PairListCXXR::tail0 (ConsCell *cc)
 cc ? cc->tail() : 0
SEXP CAR (SEXP e)
 Get car of CXXR::ConsCell.
SEXP CAAR (SEXP e)
 Equivalent to CAR(CAR(e)).
int MISSING (SEXP x)
SEXP SETCAR (SEXP x, SEXP y)
 Set the 'car' value of a CXXR::ConsCell.
void SET_MISSING (SEXP x, int v)
SEXP TAG (SEXP e)
 Get tag of CXXR::ConsCell.
void SET_TAG (SEXP x, SEXP y)
 Set the tag of a CXXR::ConsCell.
SEXP Rf_allocSExp (SEXPTYPE t)
 Create an object of a type derived from CXXR::ConsCell.

Detailed Description

Class CXXR::ConsCell and associated C interface.

To facilitate inlining of various ConsCell member functions, this file also includes the definition of class CXXR::PairList.

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


Function Documentation

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 Rf_allocSExp ( SEXPTYPE  t)

Create an object of a type derived from CXXR::ConsCell.

The object is created with null car, tag and tail pointers.

Parameters:
tThe SEXPTYPE of the required object. Must be one of LISTSXP, LANGSXP, DOTSXP or BCODESXP (not checked).
Returns:
Pointer to the created object.
void SET_TAG ( SEXP  x,
SEXP  y 
)

Set the tag of a CXXR::ConsCell.

Parameters:
xPointer to a CXXR::ConsCell (checked).
yPointer a CXXR::RObject representing the new tag of the CXXR::ConsCell.
SEXP SETCAR ( SEXP  x,
SEXP  y 
)

Set the 'car' value of a CXXR::ConsCell.

Parameters:
xPointer to a CXXR::ConsCell (checked).
yPointer a CXXR::RObject representing the new value of the list car.
Returns:
y.
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.