// Generated by cpp11: do not edit by hand
// clang-format off

#include "haven_types.h"
#include "cpp11/declarations.hpp"
#include <R_ext/Visibility.h>

// DfReader.cpp
cpp11::list df_parse_sas_file(cpp11::list spec_b7dat, cpp11::list spec_b7cat, std::string encoding, std::string catalog_encoding, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_sas_file(SEXP spec_b7dat, SEXP spec_b7cat, SEXP encoding, SEXP catalog_encoding, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_sas_file(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec_b7dat), cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec_b7cat), cpp11::as_cpp<cpp11::decay_t<std::string>>(encoding), cpp11::as_cpp<cpp11::decay_t<std::string>>(catalog_encoding), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_sas_raw(cpp11::list spec_b7dat, cpp11::list spec_b7cat, std::string encoding, std::string catalog_encoding, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_sas_raw(SEXP spec_b7dat, SEXP spec_b7cat, SEXP encoding, SEXP catalog_encoding, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_sas_raw(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec_b7dat), cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec_b7cat), cpp11::as_cpp<cpp11::decay_t<std::string>>(encoding), cpp11::as_cpp<cpp11::decay_t<std::string>>(catalog_encoding), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_xpt_file(cpp11::list spec, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_xpt_file(SEXP spec, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_xpt_file(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_xpt_raw(cpp11::list spec, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_xpt_raw(SEXP spec, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_xpt_raw(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_dta_file(cpp11::list spec, std::string encoding, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_dta_file(SEXP spec, SEXP encoding, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_dta_file(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec), cpp11::as_cpp<cpp11::decay_t<std::string>>(encoding), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_dta_raw(cpp11::list spec, std::string encoding, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_dta_raw(SEXP spec, SEXP encoding, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_dta_raw(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec), cpp11::as_cpp<cpp11::decay_t<std::string>>(encoding), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_sav_file(cpp11::list spec, std::string encoding, bool user_na, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_sav_file(SEXP spec, SEXP encoding, SEXP user_na, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_sav_file(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec), cpp11::as_cpp<cpp11::decay_t<std::string>>(encoding), cpp11::as_cpp<cpp11::decay_t<bool>>(user_na), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_sav_raw(cpp11::list spec, std::string encoding, bool user_na, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_sav_raw(SEXP spec, SEXP encoding, SEXP user_na, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_sav_raw(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec), cpp11::as_cpp<cpp11::decay_t<std::string>>(encoding), cpp11::as_cpp<cpp11::decay_t<bool>>(user_na), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_por_file(cpp11::list spec, std::string encoding, bool user_na, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_por_file(SEXP spec, SEXP encoding, SEXP user_na, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_por_file(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec), cpp11::as_cpp<cpp11::decay_t<std::string>>(encoding), cpp11::as_cpp<cpp11::decay_t<bool>>(user_na), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfReader.cpp
cpp11::list df_parse_por_raw(cpp11::list spec, std::string encoding, bool user_na, std::vector<std::string> cols_skip, long n_max, long rows_skip, cpp11::sexp name_repair);
extern "C" SEXP _haven_df_parse_por_raw(SEXP spec, SEXP encoding, SEXP user_na, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
  BEGIN_CPP11
    return cpp11::as_sexp(df_parse_por_raw(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(spec), cpp11::as_cpp<cpp11::decay_t<std::string>>(encoding), cpp11::as_cpp<cpp11::decay_t<bool>>(user_na), cpp11::as_cpp<cpp11::decay_t<std::vector<std::string>>>(cols_skip), cpp11::as_cpp<cpp11::decay_t<long>>(n_max), cpp11::as_cpp<cpp11::decay_t<long>>(rows_skip), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(name_repair)));
  END_CPP11
}
// DfWriter.cpp
void write_sav_(cpp11::list data, cpp11::strings path, std::string compress);
extern "C" SEXP _haven_write_sav_(SEXP data, SEXP path, SEXP compress) {
  BEGIN_CPP11
    write_sav_(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(data), cpp11::as_cpp<cpp11::decay_t<cpp11::strings>>(path), cpp11::as_cpp<cpp11::decay_t<std::string>>(compress));
    return R_NilValue;
  END_CPP11
}
// DfWriter.cpp
void write_dta_(cpp11::list data, cpp11::strings path, int version, cpp11::sexp label, int strl_threshold);
extern "C" SEXP _haven_write_dta_(SEXP data, SEXP path, SEXP version, SEXP label, SEXP strl_threshold) {
  BEGIN_CPP11
    write_dta_(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(data), cpp11::as_cpp<cpp11::decay_t<cpp11::strings>>(path), cpp11::as_cpp<cpp11::decay_t<int>>(version), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(label), cpp11::as_cpp<cpp11::decay_t<int>>(strl_threshold));
    return R_NilValue;
  END_CPP11
}
// DfWriter.cpp
void write_sas_(cpp11::list data, cpp11::strings path);
extern "C" SEXP _haven_write_sas_(SEXP data, SEXP path) {
  BEGIN_CPP11
    write_sas_(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(data), cpp11::as_cpp<cpp11::decay_t<cpp11::strings>>(path));
    return R_NilValue;
  END_CPP11
}
// DfWriter.cpp
void write_xpt_(cpp11::list data, cpp11::strings path, int version, std::string name, cpp11::sexp label);
extern "C" SEXP _haven_write_xpt_(SEXP data, SEXP path, SEXP version, SEXP name, SEXP label) {
  BEGIN_CPP11
    write_xpt_(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(data), cpp11::as_cpp<cpp11::decay_t<cpp11::strings>>(path), cpp11::as_cpp<cpp11::decay_t<int>>(version), cpp11::as_cpp<cpp11::decay_t<std::string>>(name), cpp11::as_cpp<cpp11::decay_t<cpp11::sexp>>(label));
    return R_NilValue;
  END_CPP11
}

extern "C" {
/* .Call calls */
extern SEXP is_tagged_na_(SEXP, SEXP);
extern SEXP na_tag_(SEXP);
extern SEXP tagged_na_(SEXP);

static const R_CallMethodDef CallEntries[] = {
    {"_haven_df_parse_dta_file", (DL_FUNC) &_haven_df_parse_dta_file, 6},
    {"_haven_df_parse_dta_raw",  (DL_FUNC) &_haven_df_parse_dta_raw,  6},
    {"_haven_df_parse_por_file", (DL_FUNC) &_haven_df_parse_por_file, 7},
    {"_haven_df_parse_por_raw",  (DL_FUNC) &_haven_df_parse_por_raw,  7},
    {"_haven_df_parse_sas_file", (DL_FUNC) &_haven_df_parse_sas_file, 8},
    {"_haven_df_parse_sas_raw",  (DL_FUNC) &_haven_df_parse_sas_raw,  8},
    {"_haven_df_parse_sav_file", (DL_FUNC) &_haven_df_parse_sav_file, 7},
    {"_haven_df_parse_sav_raw",  (DL_FUNC) &_haven_df_parse_sav_raw,  7},
    {"_haven_df_parse_xpt_file", (DL_FUNC) &_haven_df_parse_xpt_file, 5},
    {"_haven_df_parse_xpt_raw",  (DL_FUNC) &_haven_df_parse_xpt_raw,  5},
    {"_haven_write_dta_",        (DL_FUNC) &_haven_write_dta_,        5},
    {"_haven_write_sas_",        (DL_FUNC) &_haven_write_sas_,        2},
    {"_haven_write_sav_",        (DL_FUNC) &_haven_write_sav_,        3},
    {"_haven_write_xpt_",        (DL_FUNC) &_haven_write_xpt_,        5},
    {"is_tagged_na_",            (DL_FUNC) &is_tagged_na_,            2},
    {"na_tag_",                  (DL_FUNC) &na_tag_,                  1},
    {"tagged_na_",               (DL_FUNC) &tagged_na_,               1},
    {NULL, NULL, 0}
};
}

extern "C" attribute_visible void R_init_haven(DllInfo* dll){
  R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
  R_useDynamicSymbols(dll, FALSE);
  R_forceSymbols(dll, TRUE);
}
