// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include "../inst/include/later.h"
#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// testCallbackOrdering
void testCallbackOrdering();
RcppExport SEXP _later_testCallbackOrdering() {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    testCallbackOrdering();
    return R_NilValue;
END_RCPP
}
// log_level
std::string log_level(std::string level);
RcppExport SEXP _later_log_level(SEXP levelSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type level(levelSEXP);
    rcpp_result_gen = Rcpp::wrap(log_level(level));
    return rcpp_result_gen;
END_RCPP
}
// using_ubsan
bool using_ubsan();
RcppExport SEXP _later_using_ubsan() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(using_ubsan());
    return rcpp_result_gen;
END_RCPP
}
// execLater_fd
Rcpp::RObject execLater_fd(Rcpp::Function callback, Rcpp::IntegerVector readfds, Rcpp::IntegerVector writefds, Rcpp::IntegerVector exceptfds, Rcpp::NumericVector timeoutSecs, Rcpp::IntegerVector loop_id);
RcppExport SEXP _later_execLater_fd(SEXP callbackSEXP, SEXP readfdsSEXP, SEXP writefdsSEXP, SEXP exceptfdsSEXP, SEXP timeoutSecsSEXP, SEXP loop_idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::Function >::type callback(callbackSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type readfds(readfdsSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type writefds(writefdsSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type exceptfds(exceptfdsSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type timeoutSecs(timeoutSecsSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type loop_id(loop_idSEXP);
    rcpp_result_gen = Rcpp::wrap(execLater_fd(callback, readfds, writefds, exceptfds, timeoutSecs, loop_id));
    return rcpp_result_gen;
END_RCPP
}
// fd_cancel
Rcpp::LogicalVector fd_cancel(Rcpp::RObject xptr);
RcppExport SEXP _later_fd_cancel(SEXP xptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::RObject >::type xptr(xptrSEXP);
    rcpp_result_gen = Rcpp::wrap(fd_cancel(xptr));
    return rcpp_result_gen;
END_RCPP
}
// setCurrentRegistryId
void setCurrentRegistryId(int id);
RcppExport SEXP _later_setCurrentRegistryId(SEXP idSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type id(idSEXP);
    setCurrentRegistryId(id);
    return R_NilValue;
END_RCPP
}
// getCurrentRegistryId
int getCurrentRegistryId();
RcppExport SEXP _later_getCurrentRegistryId() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(getCurrentRegistryId());
    return rcpp_result_gen;
END_RCPP
}
// deleteCallbackRegistry
bool deleteCallbackRegistry(int loop_id);
RcppExport SEXP _later_deleteCallbackRegistry(SEXP loop_idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type loop_id(loop_idSEXP);
    rcpp_result_gen = Rcpp::wrap(deleteCallbackRegistry(loop_id));
    return rcpp_result_gen;
END_RCPP
}
// notifyRRefDeleted
bool notifyRRefDeleted(int loop_id);
RcppExport SEXP _later_notifyRRefDeleted(SEXP loop_idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type loop_id(loop_idSEXP);
    rcpp_result_gen = Rcpp::wrap(notifyRRefDeleted(loop_id));
    return rcpp_result_gen;
END_RCPP
}
// createCallbackRegistry
void createCallbackRegistry(int id, int parent_id);
RcppExport SEXP _later_createCallbackRegistry(SEXP idSEXP, SEXP parent_idSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type id(idSEXP);
    Rcpp::traits::input_parameter< int >::type parent_id(parent_idSEXP);
    createCallbackRegistry(id, parent_id);
    return R_NilValue;
END_RCPP
}
// existsCallbackRegistry
bool existsCallbackRegistry(int id);
RcppExport SEXP _later_existsCallbackRegistry(SEXP idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type id(idSEXP);
    rcpp_result_gen = Rcpp::wrap(existsCallbackRegistry(id));
    return rcpp_result_gen;
END_RCPP
}
// list_queue_
Rcpp::List list_queue_(int id);
RcppExport SEXP _later_list_queue_(SEXP idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type id(idSEXP);
    rcpp_result_gen = Rcpp::wrap(list_queue_(id));
    return rcpp_result_gen;
END_RCPP
}
// execCallbacks
bool execCallbacks(double timeoutSecs, bool runAll, int loop_id);
RcppExport SEXP _later_execCallbacks(SEXP timeoutSecsSEXP, SEXP runAllSEXP, SEXP loop_idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type timeoutSecs(timeoutSecsSEXP);
    Rcpp::traits::input_parameter< bool >::type runAll(runAllSEXP);
    Rcpp::traits::input_parameter< int >::type loop_id(loop_idSEXP);
    rcpp_result_gen = Rcpp::wrap(execCallbacks(timeoutSecs, runAll, loop_id));
    return rcpp_result_gen;
END_RCPP
}
// idle
bool idle(int loop_id);
RcppExport SEXP _later_idle(SEXP loop_idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type loop_id(loop_idSEXP);
    rcpp_result_gen = Rcpp::wrap(idle(loop_id));
    return rcpp_result_gen;
END_RCPP
}
// ensureInitialized
void ensureInitialized();
RcppExport SEXP _later_ensureInitialized() {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    ensureInitialized();
    return R_NilValue;
END_RCPP
}
// execLater
std::string execLater(Rcpp::Function callback, double delaySecs, int loop_id);
RcppExport SEXP _later_execLater(SEXP callbackSEXP, SEXP delaySecsSEXP, SEXP loop_idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::Function >::type callback(callbackSEXP);
    Rcpp::traits::input_parameter< double >::type delaySecs(delaySecsSEXP);
    Rcpp::traits::input_parameter< int >::type loop_id(loop_idSEXP);
    rcpp_result_gen = Rcpp::wrap(execLater(callback, delaySecs, loop_id));
    return rcpp_result_gen;
END_RCPP
}
// cancel
bool cancel(std::string callback_id_s, int loop_id);
RcppExport SEXP _later_cancel(SEXP callback_id_sSEXP, SEXP loop_idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type callback_id_s(callback_id_sSEXP);
    Rcpp::traits::input_parameter< int >::type loop_id(loop_idSEXP);
    rcpp_result_gen = Rcpp::wrap(cancel(callback_id_s, loop_id));
    return rcpp_result_gen;
END_RCPP
}
// nextOpSecs
double nextOpSecs(int loop_id);
RcppExport SEXP _later_nextOpSecs(SEXP loop_idSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type loop_id(loop_idSEXP);
    rcpp_result_gen = Rcpp::wrap(nextOpSecs(loop_id));
    return rcpp_result_gen;
END_RCPP
}
