23 #ifndef RCPP_ROUTINE_H
24 #define RCPP_ROUTINE_H
28 #if defined(COMPILING_RCPP)
44 struct tm *
gmtime_(
const time_t *
const);
57 std::string
demangle(
const std::string& name);
60 SEXP
stack_trace(
const char *file =
"",
int line = -1);
82 #define GET_CALLABLE(__FUN__) (Fun) R_GetCCallable( "Rcpp", __FUN__ )
84 inline attribute_hidden
const char*
type2name(SEXP x){
85 typedef const char* (*Fun)(SEXP);
92 typedef unsigned long (*Fun)(void);
98 typedef unsigned long (*Fun)(void);
104 typedef unsigned long (*Fun)(void);
105 static Fun fun =
GET_CALLABLE(
"beginSuspendRNGSynchronization");
110 typedef unsigned long (*Fun)(void);
111 static Fun fun =
GET_CALLABLE(
"endSuspendRNGSynchronization");
116 typedef char* (*Fun)(void);
122 typedef SEXP (*Fun)(void);
131 typedef double (*Fun)(
struct tm&);
136 inline attribute_hidden
struct tm *
gmtime_(
const time_t *
const x){
137 typedef struct tm* (*Fun)(
const time_t*
const);
143 typedef void (*Fun)(void);
148 typedef void (*Fun)(void);
149 static Fun fun =
GET_CALLABLE(
"Rcpp_precious_teardown");
153 typedef SEXP (*Fun)(SEXP);
154 static Fun fun =
GET_CALLABLE(
"Rcpp_precious_preserve");
158 typedef void (*Fun)(SEXP);
181 typedef SEXP (*Fun)(void);
187 typedef SEXP (*Fun)(SEXP);
192 inline attribute_hidden std::string
demangle(
const std::string& name){
193 typedef std::string (*Fun)(
const std::string& );
199 typedef const char* (*Fun)(
const char*);
204 inline attribute_hidden SEXP
stack_trace(
const char *file =
"",
int line = -1){
205 typedef SEXP (*Fun)(
const char*, int);
207 return fun(file, line);
211 typedef SEXP (*Fun)(SEXP, R_xlen_t);
217 typedef const char* (*Fun)(SEXP, R_xlen_t);
223 typedef void (*Fun)(SEXP, R_xlen_t, SEXP);
229 typedef void (*Fun)(SEXP, R_xlen_t,
const char*);
235 typedef SEXP* (*Fun)(SEXP);
241 typedef SEXP (*Fun)(SEXP, R_xlen_t);
247 typedef void (*Fun)(SEXP, R_xlen_t, SEXP);
253 typedef SEXP* (*Fun)(SEXP);
259 typedef const char* (*Fun)(SEXP);
264 inline attribute_hidden
void*
dataptr(SEXP x){
265 typedef void* (*Fun)(SEXP);
283 typedef int* (*Fun)(int);
289 typedef SEXP (*Fun)(void);
295 typedef int (*Fun)(void);
301 typedef SEXP (*Fun)(void);
302 static Fun fun =
GET_CALLABLE(
"rcpp_get_current_error");
attribute_hidden unsigned long exitRNGScope()
attribute_hidden unsigned long beginSuspendRNGSynchronization()
attribute_hidden unsigned long enterRNGScope()
attribute_hidden char * get_string_buffer()
attribute_hidden unsigned long endSuspendRNGSynchronization()
attribute_hidden SEXP get_Rcpp_namespace()
attribute_hidden Rostream< true > & Rcpp_cout_get()
attribute_hidden void Rcpp_precious_init()
attribute_hidden struct tm * gmtime_(const time_t *const x)
attribute_hidden SEXP Rcpp_precious_preserve(SEXP object)
attribute_hidden const char * type2name(SEXP x)
attribute_hidden Rostream< false > & Rcpp_cerr_get()
attribute_hidden double mktime00(struct tm &tm)
attribute_hidden void Rcpp_precious_remove(SEXP token)
attribute_hidden void Rcpp_precious_teardown()
attribute_hidden SEXP * get_string_ptr(SEXP s)
attribute_hidden SEXP rcpp_set_stack_trace(SEXP e)
attribute_hidden const char * char_get_string_elt(SEXP s, R_xlen_t i)
attribute_hidden void char_set_string_elt(SEXP s, R_xlen_t i, const char *v)
attribute_hidden Rcpp::Module * getCurrentScope()
attribute_hidden SEXP rcpp_get_current_error()
attribute_hidden const char * char_nocheck(SEXP x)
attribute_hidden SEXP stack_trace(const char *file="", int line=-1)
attribute_hidden SEXP get_string_elt(SEXP s, R_xlen_t i)
attribute_hidden void * dataptr(SEXP x)
attribute_hidden int * get_cache(int n)
attribute_hidden SEXP * get_vector_ptr(SEXP v)
attribute_hidden SEXP get_vector_elt(SEXP v, R_xlen_t i)
attribute_hidden int error_occured()
#define GET_CALLABLE(__FUN__)
attribute_hidden std::string demangle(const std::string &name)
attribute_hidden void set_string_elt(SEXP s, R_xlen_t i, SEXP v)
attribute_hidden SEXP rcpp_get_stack_trace()
attribute_hidden SEXP reset_current_error()
attribute_hidden void setCurrentScope(Rcpp::Module *mod)
attribute_hidden const char * short_file_name(const char *file)
attribute_hidden void set_vector_elt(SEXP v, R_xlen_t i, SEXP x)