23 #define COMPILING_RCPP
24 #define RCPP_USE_GLOBAL_ROSTREAM
31 #include <R_ext/PrtUtil.h>
33 #ifdef RCPP_HAS_DEMANGLING
92 case NILSXP:
return "NILSXP";
93 case SYMSXP:
return "SYMSXP";
94 case RAWSXP:
return "RAWSXP";
95 case LISTSXP:
return "LISTSXP";
96 case CLOSXP:
return "CLOSXP";
97 case ENVSXP:
return "ENVSXP";
98 case PROMSXP:
return "PROMSXP";
99 case LANGSXP:
return "LANGSXP";
100 case SPECIALSXP:
return "SPECIALSXP";
101 case BUILTINSXP:
return "BUILTINSXP";
102 case CHARSXP:
return "CHARSXP";
103 case LGLSXP:
return "LGLSXP";
104 case INTSXP:
return "INTSXP";
105 case REALSXP:
return "REALSXP";
106 case CPLXSXP:
return "CPLXSXP";
107 case STRSXP:
return "STRSXP";
108 case DOTSXP:
return "DOTSXP";
109 case ANYSXP:
return "ANYSXP";
110 case VECSXP:
return "VECSXP";
111 case EXPRSXP:
return "EXPRSXP";
112 case BCODESXP:
return "BCODESXP";
113 case EXTPTRSXP:
return "EXTPTRSXP";
114 case WEAKREFSXP:
return "WEAKREFSXP";
115 case S4SXP:
return "S4SXP";
126 #ifdef RCPP_HAS_DEMANGLING
127 std::string real_class;
130 dem = abi::__cxa_demangle(name.c_str(), 0, 0, &status);
150 static std::string f;
152 size_t index = f.find(
"/include/");
153 if (index != std::string::npos) {
154 f = f.substr(index + 9);
162 snprintf(buffer, 20,
"%p", (
void*)R_ExternalPtrAddr(xp));
170 #ifdef HAS_VARIADIC_TEMPLATES
171 LOGICAL(cap)[0] = TRUE;
173 LOGICAL(cap)[0] = FALSE;
175 #ifdef HAS_CXX0X_INITIALIZER_LIST
176 LOGICAL(cap)[1] = TRUE;
178 LOGICAL(cap)[1] = FALSE;
181 LOGICAL(cap)[2] = TRUE;
183 #ifdef HAS_TR1_UNORDERED_MAP
184 LOGICAL(cap)[3] = TRUE;
186 LOGICAL(cap)[3] = FALSE;
189 #ifdef HAS_TR1_UNORDERED_SET
190 LOGICAL(cap)[4] = TRUE;
192 LOGICAL(cap)[4] = FALSE;
195 LOGICAL(cap)[5] = TRUE;
197 #ifdef RCPP_HAS_DEMANGLING
198 LOGICAL(cap)[6] = TRUE;
200 LOGICAL(cap)[6] = FALSE;
203 LOGICAL(cap)[7] = FALSE;
205 #ifdef RCPP_HAS_LONG_LONG_TYPES
206 LOGICAL(cap)[8] = TRUE;
208 LOGICAL(cap)[8] = FALSE;
211 #ifdef HAS_CXX0X_UNORDERED_MAP
212 LOGICAL(cap)[9] = TRUE;
214 LOGICAL(cap)[9] = FALSE;
217 #ifdef HAS_CXX0X_UNORDERED_SET
218 LOGICAL(cap)[10] = TRUE;
220 LOGICAL(cap)[10] = FALSE;
223 #ifdef RCPP_USING_CXX11
224 LOGICAL(cap)[11] = TRUE;
226 LOGICAL(cap)[11] = FALSE;
229 #ifdef RCPP_NEW_DATE_DATETIME_VECTORS
230 LOGICAL(cap)[12] = TRUE;
232 LOGICAL(cap)[12] = FALSE;
236 SET_STRING_ELT(names, 0, Rf_mkChar(
"variadic templates"));
237 SET_STRING_ELT(names, 1, Rf_mkChar(
"initializer lists"));
238 SET_STRING_ELT(names, 2, Rf_mkChar(
"exception handling"));
239 SET_STRING_ELT(names, 3, Rf_mkChar(
"tr1 unordered maps"));
240 SET_STRING_ELT(names, 4, Rf_mkChar(
"tr1 unordered sets"));
241 SET_STRING_ELT(names, 5, Rf_mkChar(
"Rcpp modules"));
242 SET_STRING_ELT(names, 6, Rf_mkChar(
"demangling"));
243 SET_STRING_ELT(names, 7, Rf_mkChar(
"classic api"));
244 SET_STRING_ELT(names, 8, Rf_mkChar(
"long long"));
245 SET_STRING_ELT(names, 9, Rf_mkChar(
"C++0x unordered maps"));
246 SET_STRING_ELT(names, 10, Rf_mkChar(
"C++0x unordered sets"));
247 SET_STRING_ELT(names, 11, Rf_mkChar(
"Full C++11 support"));
248 SET_STRING_ELT(names, 12, Rf_mkChar(
"new date(time) vectors"));
249 Rf_setAttrib(cap, R_NamesSymbol, names);
256 #if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
257 return Rf_ScalarLogical(TRUE);
259 return Rf_ScalarLogical(FALSE);
266 #if defined(RCPP_USING_CXX11)
267 return Rf_ScalarLogical(TRUE);
269 return Rf_ScalarLogical(FALSE);
293 return versionstring;
SEXP as_character_externalptr(SEXP xp)
std::string demangle(const std::string &name)
SEXP getRcppVersionStrings()
const char * short_file_name(const char *file)
SEXP rcpp_can_use_cxx11()
SEXP rcpp_can_use_cxx0x()
SEXP stack_trace(const char *file, int line)
#define RCPP_VERSION_STRING
#define RCPP_DEV_VERSION_STRING
attribute_hidden unsigned long exitRNGScope()
attribute_hidden unsigned long beginSuspendRNGSynchronization()
attribute_hidden unsigned long enterRNGScope()
attribute_hidden char * get_string_buffer()
int rngSynchronizationSuspended
attribute_hidden unsigned long endSuspendRNGSynchronization()
attribute_hidden Rostream< true > & Rcpp_cout_get()
attribute_hidden const char * type2name(SEXP x)
attribute_hidden Rostream< false > & Rcpp_cerr_get()
static Rostream< false > Rcerr
static Rostream< true > Rcout
SEXP wrap(const Date &date)