Rcpp Version 0.12.14
dispatch.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ___RCPP_HANDLE_CASE___(___RTYPE___, ___FUN___, ___OBJECT___, ___RCPPTYPE___)
 
#define ___RCPP_RETURN___(__FUN__, __SEXP__, __RCPPTYPE__)
 
#define RCPP_RETURN_VECTOR(_FUN_, _SEXP_)   ___RCPP_RETURN___(_FUN_, _SEXP_, Vector)
 
#define RCPP_RETURN_MATRIX(_FUN_, _SEXP_)   ___RCPP_RETURN___(_FUN_, _SEXP_, Matrix)
 

Macro Definition Documentation

◆ ___RCPP_HANDLE_CASE___

#define ___RCPP_HANDLE_CASE___ (   ___RTYPE___,
  ___FUN___,
  ___OBJECT___,
  ___RCPPTYPE___ 
)
Value:
case ___RTYPE___: \
return ___FUN___(::Rcpp::___RCPPTYPE___<___RTYPE___>(___OBJECT___));

Definition at line 82 of file dispatch.h.

◆ ___RCPP_RETURN___

#define ___RCPP_RETURN___ (   __FUN__,
  __SEXP__,
  __RCPPTYPE__ 
)
Value:
SEXP __TMP__ = __SEXP__; \
switch (TYPEOF(__TMP__)) { \
___RCPP_HANDLE_CASE___(INTSXP, __FUN__, __TMP__, __RCPPTYPE__) \
___RCPP_HANDLE_CASE___(REALSXP, __FUN__, __TMP__, __RCPPTYPE__) \
___RCPP_HANDLE_CASE___(RAWSXP, __FUN__, __TMP__, __RCPPTYPE__) \
___RCPP_HANDLE_CASE___(LGLSXP, __FUN__, __TMP__, __RCPPTYPE__) \
___RCPP_HANDLE_CASE___(CPLXSXP, __FUN__, __TMP__, __RCPPTYPE__) \
___RCPP_HANDLE_CASE___(STRSXP, __FUN__, __TMP__, __RCPPTYPE__) \
___RCPP_HANDLE_CASE___(VECSXP, __FUN__, __TMP__, __RCPPTYPE__) \
___RCPP_HANDLE_CASE___(EXPRSXP, __FUN__, __TMP__, __RCPPTYPE__) \
default: \
throw std::range_error("Not a vector"); \
}

Definition at line 87 of file dispatch.h.

◆ RCPP_RETURN_MATRIX

#define RCPP_RETURN_MATRIX (   _FUN_,
  _SEXP_ 
)    ___RCPP_RETURN___(_FUN_, _SEXP_, Matrix)

Definition at line 104 of file dispatch.h.

◆ RCPP_RETURN_VECTOR

#define RCPP_RETURN_VECTOR (   _FUN_,
  _SEXP_ 
)    ___RCPP_RETURN___(_FUN_, _SEXP_, Vector)

Definition at line 102 of file dispatch.h.