|
Rcpp Version 0.9.10
|
#include <Language.h>


Public Member Functions | |
| Language () | |
| Language (SEXP lang) | |
| Language (const Language &other) | |
| Language & | operator= (const Language &other) |
| Language (const std::string &symbol) | |
| Language (const Symbol &symbol) | |
| Language (const Function &function) | |
| void | setSymbol (const std::string &symbol) |
| void | setSymbol (const Symbol &symbol) |
| void | setFunction (const Function &function) |
| SEXP | eval () |
| SEXP | eval (SEXP env) |
| ~Language () | |
Private Member Functions | |
| virtual void | update () |
C++ wrapper around calls (LANGSXP SEXP)
This represents calls that can be evaluated
Definition at line 39 of file Language.h.
| Rcpp::Language::Language | ( | ) |
Definition at line 26 of file Language.cpp.
| Rcpp::Language::Language | ( | SEXP | lang | ) |
Attempts to convert the SEXP to a call
| not_compatible | if the SEXP could not be converted to a call using as.call |
Definition at line 28 of file Language.cpp.
References Rcpp::RObject::setSEXP().

| Rcpp::Language::Language | ( | const Language & | other | ) |
Definition at line 32 of file Language.cpp.
References Rcpp::RObject::asSexp(), and Rcpp::RObject::setSEXP().

| Rcpp::Language::Language | ( | const std::string & | symbol | ) | [explicit] |
Creates a call using the given symbol as the function name
| symbol | symbol name to call |
Language( "rnorm" ) makes a SEXP similar to this (expressed in R) > as.call( as.list( as.name( "rnorm") ) ) > call( "rnorm" )
Definition at line 41 of file Language.cpp.
References Rcpp::RObject::setSEXP().

| Rcpp::Language::Language | ( | const Symbol & | symbol | ) | [explicit] |
Creates a call using the given symbol as the function name
| symbol | symbol name to call |
Language( Symbol("rnorm") ) makes a SEXP similar to this: > call( "rnorm" )
Definition at line 45 of file Language.cpp.
References Rcpp::RObject::setSEXP().

| Rcpp::Language::Language | ( | const Function & | function | ) | [explicit] |
Creates a call to the function
| function | function to call |
Definition at line 49 of file Language.cpp.
References Rcpp::RObject::setSEXP().

| Rcpp::Language::~Language | ( | ) |
Definition at line 53 of file Language.cpp.
| SEXP Rcpp::Language::eval | ( | ) |
eval this call in the global environment
Definition at line 74 of file Language.cpp.
Referenced by Rcpp::binary_call< T1, T2, OUT >::operator()(), Rcpp::unary_call< T, OUT >::operator()(), and Rcpp::fixed_call< OUT >::operator()().
| SEXP Rcpp::Language::eval | ( | SEXP | env | ) |
eval this call in the requested environment
Definition at line 78 of file Language.cpp.
References Rcpp::RObject::m_sexp, and Rcpp::internal::try_catch().

Definition at line 36 of file Language.cpp.
References Rcpp::RObject::asSexp(), and Rcpp::RObject::setSEXP().

| void Rcpp::Language::setFunction | ( | const Function & | function | ) |
sets the function
Definition at line 64 of file Language.cpp.
References Rcpp::RObject::m_sexp, and R_NilValue.
| void Rcpp::Language::setSymbol | ( | const std::string & | symbol | ) |
Creates a call to the given symbol using variable number of arguments
| symbol | symbol |
| ...Args | variable length argument list. The type of each argument must be wrappable, meaning there need to be a wrap function that takes this type as its parameter |
For example, Language( "rnorm", 10, 0.0 ) will create the same call as > call( "rnorm", 10L, 0.0 )
10 is wrapped as an integer vector using wrap( const& int ) 0.0 is wrapped as a numeric vector using wrap( const& double ) ... sets the symbol of the call
Definition at line 55 of file Language.cpp.
| void Rcpp::Language::setSymbol | ( | const Symbol & | symbol | ) |
sets the symbol of the call
Definition at line 59 of file Language.cpp.
References Rcpp::RObject::m_sexp, and R_NilValue.
| void Rcpp::Language::update | ( | ) | [private, virtual] |
Reimplemented from Rcpp::RObject.
Definition at line 69 of file Language.cpp.
References Rcpp::RObject::m_sexp, and R_NilValue.