21 #ifndef Rcpp_Language_h
22 #define Rcpp_Language_h
51 Storage::set__( r_cast<LANGSXP>(x) );
64 Storage::set__( Rf_lang1( Rf_install(symbol.c_str()) ) );
76 Storage::set__( Rf_lang1( symbol ) );
85 Storage::set__( Rf_lang1(
function ) );
105 #include <Rcpp/generated/Language__ctors.h>
118 SEXP x = Storage::get__();
120 SET_TAG(x, R_NilValue);
127 SEXP x = Storage::get__();
128 SETCAR( x,
function );
129 SET_TAG(x, R_NilValue);
154 SET_TYPEOF( x, LANGSXP );
155 SET_TAG( x, R_NilValue );
162 template <
typename RESULT_TYPE=SEXP>
171 return as<RESULT_TYPE>(
call.eval() );
178 template <
typename T,
typename RESULT_TYPE = SEXP>
179 #if __cplusplus < 201103L
180 class unary_call :
public std::unary_function<T,RESULT_TYPE> {
182 class unary_call :
public std::function<RESULT_TYPE(T)> {
191 return as<RESULT_TYPE>(
call.eval() );
199 template <
typename T1,
typename T2,
typename RESULT_TYPE = SEXP>
200 #if __cplusplus < 201103L
201 class binary_call :
public std::binary_function<T1,T2,RESULT_TYPE> {
203 class binary_call :
public std::function<RESULT_TYPE(T1,T2)> {
213 return as<RESULT_TYPE>(
call.eval() );
binary_call(Function fun)
binary_call(Language call_)
binary_call(Language call_, R_xlen_t index1, R_xlen_t index2)
RESULT_TYPE operator()(const T1 &o1, const T2 &o2)
fixed_call(Language call_)
RESULT_TYPE operator()(const T &object)
unary_call(Language call_, R_xlen_t index)
unary_call(Language call_)
#define RCPP_GENERATE_CTOR_ASSIGN(__CLASS__)
SEXP Rcpp_eval_impl(SEXP expr, SEXP env)
Function_Impl< PreserveStorage > Function
RCPP_API_CLASS(DottedPair_Impl)
DottedPairProxyPolicy< Language_Impl >::const_DottedPairProxy const_Proxy
SEXP Rcpp_fast_eval(SEXP expr, SEXP env)
void setFunction(const Function &function)
void setSymbol(const std::string &symbol)
Language_Impl< PreserveStorage > Language
Symbol_Impl< NoProtectStorage > Symbol