Skip to content

Commit

Permalink
removed accidental std::fs
Browse files Browse the repository at this point in the history
  • Loading branch information
CreRecombinase committed Aug 22, 2018
1 parent f63865f commit 405ece8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 282 deletions.
16 changes: 0 additions & 16 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,6 @@ create_file_h5 <- function(filename) {
invisible(.Call(`_EigenH5_create_file_h5`, filename))
}

par_path <- function(filename) {
.Call(`_EigenH5_par_path`, filename)
}

par_iter_path <- function(filename) {
.Call(`_EigenH5_par_iter_path`, filename)
}

exp_par_iter_path <- function(filename) {
.Call(`_EigenH5_exp_par_iter_path`, filename)
}

exp_par_path <- function(filename) {
.Call(`_EigenH5_exp_par_path`, filename)
}

dataset_chunks <- function(filename, datapath) {
.Call(`_EigenH5_dataset_chunks`, filename, datapath)
}
Expand Down
84 changes: 0 additions & 84 deletions inst/include/EigenH5_RcppExports.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,90 +316,6 @@ namespace EigenH5 {
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
}

inline Rcpp::StringVector par_path(const std::string filename) {
typedef SEXP(*Ptr_par_path)(SEXP);
static Ptr_par_path p_par_path = NULL;
if (p_par_path == NULL) {
validateSignature("Rcpp::StringVector(*par_path)(const std::string)");
p_par_path = (Ptr_par_path)R_GetCCallable("EigenH5", "_EigenH5_par_path");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_par_path(Shield<SEXP>(Rcpp::wrap(filename)));
}
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<Rcpp::StringVector >(rcpp_result_gen);
}

inline Rcpp::StringVector par_iter_path(const std::string filename) {
typedef SEXP(*Ptr_par_iter_path)(SEXP);
static Ptr_par_iter_path p_par_iter_path = NULL;
if (p_par_iter_path == NULL) {
validateSignature("Rcpp::StringVector(*par_iter_path)(const std::string)");
p_par_iter_path = (Ptr_par_iter_path)R_GetCCallable("EigenH5", "_EigenH5_par_iter_path");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_par_iter_path(Shield<SEXP>(Rcpp::wrap(filename)));
}
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<Rcpp::StringVector >(rcpp_result_gen);
}

inline Rcpp::StringVector exp_par_iter_path(const std::string filename) {
typedef SEXP(*Ptr_exp_par_iter_path)(SEXP);
static Ptr_exp_par_iter_path p_exp_par_iter_path = NULL;
if (p_exp_par_iter_path == NULL) {
validateSignature("Rcpp::StringVector(*exp_par_iter_path)(const std::string)");
p_exp_par_iter_path = (Ptr_exp_par_iter_path)R_GetCCallable("EigenH5", "_EigenH5_exp_par_iter_path");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_exp_par_iter_path(Shield<SEXP>(Rcpp::wrap(filename)));
}
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<Rcpp::StringVector >(rcpp_result_gen);
}

inline Rcpp::StringVector exp_par_path(const std::string filename) {
typedef SEXP(*Ptr_exp_par_path)(SEXP);
static Ptr_exp_par_path p_exp_par_path = NULL;
if (p_exp_par_path == NULL) {
validateSignature("Rcpp::StringVector(*exp_par_path)(const std::string)");
p_exp_par_path = (Ptr_exp_par_path)R_GetCCallable("EigenH5", "_EigenH5_exp_par_path");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_exp_par_path(Shield<SEXP>(Rcpp::wrap(filename)));
}
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<Rcpp::StringVector >(rcpp_result_gen);
}

inline Rcpp::IntegerVector dataset_chunks(const std::string filename, const std::string datapath) {
typedef SEXP(*Ptr_dataset_chunks)(SEXP,SEXP);
static Ptr_dataset_chunks p_dataset_chunks = NULL;
Expand Down
156 changes: 8 additions & 148 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,142 +516,6 @@ RcppExport SEXP _EigenH5_create_file_h5(SEXP filenameSEXP) {
UNPROTECT(1);
return rcpp_result_gen;
}
// par_path
Rcpp::StringVector par_path(const std::string filename);
static SEXP _EigenH5_par_path_try(SEXP filenameSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::traits::input_parameter< const std::string >::type filename(filenameSEXP);
rcpp_result_gen = Rcpp::wrap(par_path(filename));
return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _EigenH5_par_path(SEXP filenameSEXP) {
SEXP rcpp_result_gen;
{
Rcpp::RNGScope rcpp_rngScope_gen;
rcpp_result_gen = PROTECT(_EigenH5_par_path_try(filenameSEXP));
}
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
if (rcpp_isInterrupt_gen) {
UNPROTECT(1);
Rf_onintr();
}
bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
if (rcpp_isLongjump_gen) {
Rcpp::internal::resumeJump(rcpp_result_gen);
}
Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
if (rcpp_isError_gen) {
SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
UNPROTECT(1);
Rf_error(CHAR(rcpp_msgSEXP_gen));
}
UNPROTECT(1);
return rcpp_result_gen;
}
// par_iter_path
Rcpp::StringVector par_iter_path(const std::string filename);
static SEXP _EigenH5_par_iter_path_try(SEXP filenameSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::traits::input_parameter< const std::string >::type filename(filenameSEXP);
rcpp_result_gen = Rcpp::wrap(par_iter_path(filename));
return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _EigenH5_par_iter_path(SEXP filenameSEXP) {
SEXP rcpp_result_gen;
{
Rcpp::RNGScope rcpp_rngScope_gen;
rcpp_result_gen = PROTECT(_EigenH5_par_iter_path_try(filenameSEXP));
}
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
if (rcpp_isInterrupt_gen) {
UNPROTECT(1);
Rf_onintr();
}
bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
if (rcpp_isLongjump_gen) {
Rcpp::internal::resumeJump(rcpp_result_gen);
}
Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
if (rcpp_isError_gen) {
SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
UNPROTECT(1);
Rf_error(CHAR(rcpp_msgSEXP_gen));
}
UNPROTECT(1);
return rcpp_result_gen;
}
// exp_par_iter_path
Rcpp::StringVector exp_par_iter_path(const std::string filename);
static SEXP _EigenH5_exp_par_iter_path_try(SEXP filenameSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::traits::input_parameter< const std::string >::type filename(filenameSEXP);
rcpp_result_gen = Rcpp::wrap(exp_par_iter_path(filename));
return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _EigenH5_exp_par_iter_path(SEXP filenameSEXP) {
SEXP rcpp_result_gen;
{
Rcpp::RNGScope rcpp_rngScope_gen;
rcpp_result_gen = PROTECT(_EigenH5_exp_par_iter_path_try(filenameSEXP));
}
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
if (rcpp_isInterrupt_gen) {
UNPROTECT(1);
Rf_onintr();
}
bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
if (rcpp_isLongjump_gen) {
Rcpp::internal::resumeJump(rcpp_result_gen);
}
Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
if (rcpp_isError_gen) {
SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
UNPROTECT(1);
Rf_error(CHAR(rcpp_msgSEXP_gen));
}
UNPROTECT(1);
return rcpp_result_gen;
}
// exp_par_path
Rcpp::StringVector exp_par_path(const std::string filename);
static SEXP _EigenH5_exp_par_path_try(SEXP filenameSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::traits::input_parameter< const std::string >::type filename(filenameSEXP);
rcpp_result_gen = Rcpp::wrap(exp_par_path(filename));
return rcpp_result_gen;
END_RCPP_RETURN_ERROR
}
RcppExport SEXP _EigenH5_exp_par_path(SEXP filenameSEXP) {
SEXP rcpp_result_gen;
{
Rcpp::RNGScope rcpp_rngScope_gen;
rcpp_result_gen = PROTECT(_EigenH5_exp_par_path_try(filenameSEXP));
}
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
if (rcpp_isInterrupt_gen) {
UNPROTECT(1);
Rf_onintr();
}
bool rcpp_isLongjump_gen = Rcpp::internal::isLongjumpSentinel(rcpp_result_gen);
if (rcpp_isLongjump_gen) {
Rcpp::internal::resumeJump(rcpp_result_gen);
}
Rboolean rcpp_isError_gen = Rf_inherits(rcpp_result_gen, "try-error");
if (rcpp_isError_gen) {
SEXP rcpp_msgSEXP_gen = Rf_asChar(rcpp_result_gen);
UNPROTECT(1);
Rf_error(CHAR(rcpp_msgSEXP_gen));
}
UNPROTECT(1);
return rcpp_result_gen;
}
// dataset_chunks
Rcpp::IntegerVector dataset_chunks(const std::string filename, const std::string datapath);
static SEXP _EigenH5_dataset_chunks_try(SEXP filenameSEXP, SEXP datapathSEXP) {
Expand Down Expand Up @@ -1162,10 +1026,6 @@ static int _EigenH5_RcppExport_validate(const char* sig) {
signatures.insert("SEXP(*read_attribute_h5)(const std::string&,std::string)");
signatures.insert("bool(*create_dataset_h5)(const std::string&,std::string,const RObject&,Rcpp::List)");
signatures.insert("void(*create_file_h5)(const std::string)");
signatures.insert("Rcpp::StringVector(*par_path)(const std::string)");
signatures.insert("Rcpp::StringVector(*par_iter_path)(const std::string)");
signatures.insert("Rcpp::StringVector(*exp_par_iter_path)(const std::string)");
signatures.insert("Rcpp::StringVector(*exp_par_path)(const std::string)");
signatures.insert("Rcpp::IntegerVector(*dataset_chunks)(const std::string,const std::string)");
signatures.insert("void(*extend_dataset)(const std::string,const std::string,Rcpp::IntegerVector)");
signatures.insert("void(*extend_dataset_by)(const std::string,const std::string,Rcpp::IntegerVector)");
Expand Down Expand Up @@ -1200,10 +1060,6 @@ RcppExport SEXP _EigenH5_RcppExport_registerCCallable() {
R_RegisterCCallable("EigenH5", "_EigenH5_read_attribute_h5", (DL_FUNC)_EigenH5_read_attribute_h5_try);
R_RegisterCCallable("EigenH5", "_EigenH5_create_dataset_h5", (DL_FUNC)_EigenH5_create_dataset_h5_try);
R_RegisterCCallable("EigenH5", "_EigenH5_create_file_h5", (DL_FUNC)_EigenH5_create_file_h5_try);
R_RegisterCCallable("EigenH5", "_EigenH5_par_path", (DL_FUNC)_EigenH5_par_path_try);
R_RegisterCCallable("EigenH5", "_EigenH5_par_iter_path", (DL_FUNC)_EigenH5_par_iter_path_try);
R_RegisterCCallable("EigenH5", "_EigenH5_exp_par_iter_path", (DL_FUNC)_EigenH5_exp_par_iter_path_try);
R_RegisterCCallable("EigenH5", "_EigenH5_exp_par_path", (DL_FUNC)_EigenH5_exp_par_path_try);
R_RegisterCCallable("EigenH5", "_EigenH5_dataset_chunks", (DL_FUNC)_EigenH5_dataset_chunks_try);
R_RegisterCCallable("EigenH5", "_EigenH5_extend_dataset", (DL_FUNC)_EigenH5_extend_dataset_try);
R_RegisterCCallable("EigenH5", "_EigenH5_extend_dataset_by", (DL_FUNC)_EigenH5_extend_dataset_by_try);
Expand All @@ -1222,6 +1078,10 @@ RcppExport SEXP _EigenH5_RcppExport_registerCCallable() {
return R_NilValue;
}

RcppExport SEXP _EigenH5_exp_par_iter_path(SEXP);
RcppExport SEXP _EigenH5_exp_par_path(SEXP);
RcppExport SEXP _EigenH5_par_iter_path(SEXP);
RcppExport SEXP _EigenH5_par_path(SEXP);
RcppExport SEXP run_testthat_tests();

static const R_CallMethodDef CallEntries[] = {
Expand All @@ -1240,10 +1100,6 @@ static const R_CallMethodDef CallEntries[] = {
{"_EigenH5_create_dataset_h5", (DL_FUNC) &_EigenH5_create_dataset_h5, 4},
{"_EigenH5_split_ldd", (DL_FUNC) &_EigenH5_split_ldd, 1},
{"_EigenH5_create_file_h5", (DL_FUNC) &_EigenH5_create_file_h5, 1},
{"_EigenH5_par_path", (DL_FUNC) &_EigenH5_par_path, 1},
{"_EigenH5_par_iter_path", (DL_FUNC) &_EigenH5_par_iter_path, 1},
{"_EigenH5_exp_par_iter_path", (DL_FUNC) &_EigenH5_exp_par_iter_path, 1},
{"_EigenH5_exp_par_path", (DL_FUNC) &_EigenH5_exp_par_path, 1},
{"_EigenH5_dataset_chunks", (DL_FUNC) &_EigenH5_dataset_chunks, 2},
{"_EigenH5_extend_dataset", (DL_FUNC) &_EigenH5_extend_dataset, 3},
{"_EigenH5_extend_dataset_by", (DL_FUNC) &_EigenH5_extend_dataset_by, 3},
Expand All @@ -1259,6 +1115,10 @@ static const R_CallMethodDef CallEntries[] = {
{"_EigenH5_dim_h5", (DL_FUNC) &_EigenH5_dim_h5, 2},
{"_EigenH5_concat_mats", (DL_FUNC) &_EigenH5_concat_mats, 4},
{"_EigenH5_RcppExport_registerCCallable", (DL_FUNC) &_EigenH5_RcppExport_registerCCallable, 0},
{"_EigenH5_exp_par_iter_path", (DL_FUNC) &_EigenH5_exp_par_iter_path, 1},
{"_EigenH5_exp_par_path", (DL_FUNC) &_EigenH5_exp_par_path, 1},
{"_EigenH5_par_iter_path", (DL_FUNC) &_EigenH5_par_iter_path, 1},
{"_EigenH5_par_path", (DL_FUNC) &_EigenH5_par_path, 1},
{"run_testthat_tests", (DL_FUNC) &run_testthat_tests, 0},
{NULL, NULL, 0}
};
Expand Down
34 changes: 0 additions & 34 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,8 @@ void create_file_h5(const std::string filename){
HighFive::File file(filename,HighFive::File::Create);
}

//[[Rcpp::export]]
Rcpp::StringVector par_path(const std::string filename){
std::filesystem::path pt(filename);

return(Rcpp::wrap(pt.parent_path().string()));
}

//[[Rcpp::export]]
Rcpp::StringVector par_iter_path(const std::string filename){
std::filesystem::path pt(filename);
std::vector<std::string> retvec;
for(auto it = pt.begin(); it!=pt.end();it++){
retvec.push_back(it->string());
}
return(Rcpp::wrap(retvec));
}

//[[Rcpp::export]]
Rcpp::StringVector exp_par_iter_path(const std::string filename){
std::experimental::filesystem::path pt(filename);
std::vector<std::string> retvec;
for(auto it = pt.begin(); it!=pt.end();it++){
retvec.push_back(it->string());
}
return(Rcpp::wrap(retvec));
}




//[[Rcpp::export]]
Rcpp::StringVector exp_par_path(const std::string filename){
std::experimental::filesystem::path pt(filename);

return(Rcpp::wrap(pt.parent_path().string()));
}

//[[Rcpp::export]]
Rcpp::IntegerVector dataset_chunks(const std::string filename,
Expand Down

0 comments on commit 405ece8

Please sign in to comment.