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

#ifndef RCPP_fastrtext_RCPPEXPORTS_H_GEN_
#define RCPP_fastrtext_RCPPEXPORTS_H_GEN_

#include <Rcpp.h>

namespace fastrtext {

    using namespace Rcpp;

    namespace {
        void validateSignature(const char* sig) {
            Rcpp::Function require = Rcpp::Environment::base_env()["require"];
            require("fastrtext", Rcpp::Named("quietly") = true);
            typedef int(*Ptr_validate)(const char*);
            static Ptr_validate p_validate = (Ptr_validate)
                R_GetCCallable("fastrtext", "_fastrtext_RcppExport_validate");
            if (!p_validate(sig)) {
                throw Rcpp::function_not_exported(
                    "C++ function with signature '" + std::string(sig) + "' not found in fastrtext");
            }
        }
    }

    inline CharacterVector add_prefix(const CharacterVector& texts, CharacterVector prefix) {
        typedef SEXP(*Ptr_add_prefix)(SEXP,SEXP);
        static Ptr_add_prefix p_add_prefix = NULL;
        if (p_add_prefix == NULL) {
            validateSignature("CharacterVector(*add_prefix)(const CharacterVector&,CharacterVector)");
            p_add_prefix = (Ptr_add_prefix)R_GetCCallable("fastrtext", "_fastrtext_add_prefix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_add_prefix(Shield<SEXP>(Rcpp::wrap(texts)), Shield<SEXP>(Rcpp::wrap(prefix)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<CharacterVector >(rcpp_result_gen);
    }

    inline std::string add_pr(const std::string& line, const std::string& prefix) {
        typedef SEXP(*Ptr_add_pr)(SEXP,SEXP);
        static Ptr_add_pr p_add_pr = NULL;
        if (p_add_pr == NULL) {
            validateSignature("std::string(*add_pr)(const std::string&,const std::string&)");
            p_add_pr = (Ptr_add_pr)R_GetCCallable("fastrtext", "_fastrtext_add_pr");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_add_pr(Shield<SEXP>(Rcpp::wrap(line)), Shield<SEXP>(Rcpp::wrap(prefix)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::string >(rcpp_result_gen);
    }

}

#endif // RCPP_fastrtext_RCPPEXPORTS_H_GEN_
