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

#include <Rcpp.h>

using namespace Rcpp;

// fillDown
SEXP fillDown(SEXP x);
RcppExport SEXP _tidyr_fillDown(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(fillDown(x));
    return rcpp_result_gen;
END_RCPP
}
// fillUp
SEXP fillUp(SEXP x);
RcppExport SEXP _tidyr_fillUp(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(fillUp(x));
    return rcpp_result_gen;
END_RCPP
}
// melt_dataframe
List melt_dataframe(const DataFrame& data, const IntegerVector& id_ind, const IntegerVector& measure_ind, String variable_name, String value_name, SEXP attrTemplate, bool factorsAsStrings, bool valueAsFactor, bool variableAsFactor);
RcppExport SEXP _tidyr_melt_dataframe(SEXP dataSEXP, SEXP id_indSEXP, SEXP measure_indSEXP, SEXP variable_nameSEXP, SEXP value_nameSEXP, SEXP attrTemplateSEXP, SEXP factorsAsStringsSEXP, SEXP valueAsFactorSEXP, SEXP variableAsFactorSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const DataFrame& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type id_ind(id_indSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type measure_ind(measure_indSEXP);
    Rcpp::traits::input_parameter< String >::type variable_name(variable_nameSEXP);
    Rcpp::traits::input_parameter< String >::type value_name(value_nameSEXP);
    Rcpp::traits::input_parameter< SEXP >::type attrTemplate(attrTemplateSEXP);
    Rcpp::traits::input_parameter< bool >::type factorsAsStrings(factorsAsStringsSEXP);
    Rcpp::traits::input_parameter< bool >::type valueAsFactor(valueAsFactorSEXP);
    Rcpp::traits::input_parameter< bool >::type variableAsFactor(variableAsFactorSEXP);
    rcpp_result_gen = Rcpp::wrap(melt_dataframe(data, id_ind, measure_ind, variable_name, value_name, attrTemplate, factorsAsStrings, valueAsFactor, variableAsFactor));
    return rcpp_result_gen;
END_RCPP
}
// simplifyPieces
List simplifyPieces(ListOf<CharacterVector> pieces, int p, bool fillLeft);
RcppExport SEXP _tidyr_simplifyPieces(SEXP piecesSEXP, SEXP pSEXP, SEXP fillLeftSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< ListOf<CharacterVector> >::type pieces(piecesSEXP);
    Rcpp::traits::input_parameter< int >::type p(pSEXP);
    Rcpp::traits::input_parameter< bool >::type fillLeft(fillLeftSEXP);
    rcpp_result_gen = Rcpp::wrap(simplifyPieces(pieces, p, fillLeft));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_tidyr_fillDown", (DL_FUNC) &_tidyr_fillDown, 1},
    {"_tidyr_fillUp", (DL_FUNC) &_tidyr_fillUp, 1},
    {"_tidyr_melt_dataframe", (DL_FUNC) &_tidyr_melt_dataframe, 9},
    {"_tidyr_simplifyPieces", (DL_FUNC) &_tidyr_simplifyPieces, 3},
    {NULL, NULL, 0}
};

RcppExport void R_init_tidyr(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
