Universally Unique Lexicographically Sortable Identifiers in R
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

52 lines
1.6 KiB

// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// ts_generate
CharacterVector ts_generate(Rcpp::DatetimeVector tsv);
RcppExport SEXP _ulid_ts_generate(SEXP tsvSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::DatetimeVector >::type tsv(tsvSEXP);
rcpp_result_gen = Rcpp::wrap(ts_generate(tsv));
return rcpp_result_gen;
END_RCPP
}
// ULIDgenerate
CharacterVector ULIDgenerate(long n);
RcppExport SEXP _ulid_ULIDgenerate(SEXP nSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< long >::type n(nSEXP);
rcpp_result_gen = Rcpp::wrap(ULIDgenerate(n));
return rcpp_result_gen;
END_RCPP
}
// unmarshal
DataFrame unmarshal(std::vector<std::string> ulids);
RcppExport SEXP _ulid_unmarshal(SEXP ulidsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< std::vector<std::string> >::type ulids(ulidsSEXP);
rcpp_result_gen = Rcpp::wrap(unmarshal(ulids));
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_ulid_ts_generate", (DL_FUNC) &_ulid_ts_generate, 1},
{"_ulid_ULIDgenerate", (DL_FUNC) &_ulid_ULIDgenerate, 1},
{"_ulid_unmarshal", (DL_FUNC) &_ulid_unmarshal, 1},
{NULL, NULL, 0}
};
RcppExport void R_init_ulid(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}