1 // Generated by cpp11: do not edit by hand
2 // clang-format off
3
4 #include "haven_types.h"
5 #include "cpp11/declarations.hpp"
6
7 // DfReader.cpp
8 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, std::string name_repair);
_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)9 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) {
10 BEGIN_CPP11
11 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<std::string>>(name_repair)));
12 END_CPP11
13 }
14 // DfReader.cpp
15 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, std::string name_repair);
_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)16 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) {
17 BEGIN_CPP11
18 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<std::string>>(name_repair)));
19 END_CPP11
20 }
21 // DfReader.cpp
22 cpp11::list df_parse_xpt_file(cpp11::list spec, std::vector<std::string> cols_skip, long n_max, long rows_skip, std::string name_repair);
_haven_df_parse_xpt_file(SEXP spec,SEXP cols_skip,SEXP n_max,SEXP rows_skip,SEXP name_repair)23 extern "C" SEXP _haven_df_parse_xpt_file(SEXP spec, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
24 BEGIN_CPP11
25 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<std::string>>(name_repair)));
26 END_CPP11
27 }
28 // DfReader.cpp
29 cpp11::list df_parse_xpt_raw(cpp11::list spec, std::vector<std::string> cols_skip, long n_max, long rows_skip, std::string name_repair);
_haven_df_parse_xpt_raw(SEXP spec,SEXP cols_skip,SEXP n_max,SEXP rows_skip,SEXP name_repair)30 extern "C" SEXP _haven_df_parse_xpt_raw(SEXP spec, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
31 BEGIN_CPP11
32 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<std::string>>(name_repair)));
33 END_CPP11
34 }
35 // DfReader.cpp
36 cpp11::list df_parse_dta_file(cpp11::list spec, std::string encoding, std::vector<std::string> cols_skip, long n_max, long rows_skip, std::string name_repair);
_haven_df_parse_dta_file(SEXP spec,SEXP encoding,SEXP cols_skip,SEXP n_max,SEXP rows_skip,SEXP name_repair)37 extern "C" SEXP _haven_df_parse_dta_file(SEXP spec, SEXP encoding, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
38 BEGIN_CPP11
39 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<std::string>>(name_repair)));
40 END_CPP11
41 }
42 // DfReader.cpp
43 cpp11::list df_parse_dta_raw(cpp11::list spec, std::string encoding, std::vector<std::string> cols_skip, long n_max, long rows_skip, std::string name_repair);
_haven_df_parse_dta_raw(SEXP spec,SEXP encoding,SEXP cols_skip,SEXP n_max,SEXP rows_skip,SEXP name_repair)44 extern "C" SEXP _haven_df_parse_dta_raw(SEXP spec, SEXP encoding, SEXP cols_skip, SEXP n_max, SEXP rows_skip, SEXP name_repair) {
45 BEGIN_CPP11
46 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<std::string>>(name_repair)));
47 END_CPP11
48 }
49 // DfReader.cpp
50 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, std::string name_repair);
_haven_df_parse_sav_file(SEXP spec,SEXP encoding,SEXP user_na,SEXP cols_skip,SEXP n_max,SEXP rows_skip,SEXP name_repair)51 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) {
52 BEGIN_CPP11
53 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<std::string>>(name_repair)));
54 END_CPP11
55 }
56 // DfReader.cpp
57 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, std::string name_repair);
_haven_df_parse_sav_raw(SEXP spec,SEXP encoding,SEXP user_na,SEXP cols_skip,SEXP n_max,SEXP rows_skip,SEXP name_repair)58 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) {
59 BEGIN_CPP11
60 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<std::string>>(name_repair)));
61 END_CPP11
62 }
63 // DfReader.cpp
64 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, std::string name_repair);
_haven_df_parse_por_file(SEXP spec,SEXP encoding,SEXP user_na,SEXP cols_skip,SEXP n_max,SEXP rows_skip,SEXP name_repair)65 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) {
66 BEGIN_CPP11
67 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<std::string>>(name_repair)));
68 END_CPP11
69 }
70 // DfReader.cpp
71 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, std::string name_repair);
_haven_df_parse_por_raw(SEXP spec,SEXP encoding,SEXP user_na,SEXP cols_skip,SEXP n_max,SEXP rows_skip,SEXP name_repair)72 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) {
73 BEGIN_CPP11
74 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<std::string>>(name_repair)));
75 END_CPP11
76 }
77 // DfWriter.cpp
78 void write_sav_(cpp11::list data, cpp11::strings path, bool compress);
_haven_write_sav_(SEXP data,SEXP path,SEXP compress)79 extern "C" SEXP _haven_write_sav_(SEXP data, SEXP path, SEXP compress) {
80 BEGIN_CPP11
81 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<bool>>(compress));
82 return R_NilValue;
83 END_CPP11
84 }
85 // DfWriter.cpp
86 void write_dta_(cpp11::list data, cpp11::strings path, int version, cpp11::sexp label);
_haven_write_dta_(SEXP data,SEXP path,SEXP version,SEXP label)87 extern "C" SEXP _haven_write_dta_(SEXP data, SEXP path, SEXP version, SEXP label) {
88 BEGIN_CPP11
89 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));
90 return R_NilValue;
91 END_CPP11
92 }
93 // DfWriter.cpp
94 void write_sas_(cpp11::list data, cpp11::strings path);
_haven_write_sas_(SEXP data,SEXP path)95 extern "C" SEXP _haven_write_sas_(SEXP data, SEXP path) {
96 BEGIN_CPP11
97 write_sas_(cpp11::as_cpp<cpp11::decay_t<cpp11::list>>(data), cpp11::as_cpp<cpp11::decay_t<cpp11::strings>>(path));
98 return R_NilValue;
99 END_CPP11
100 }
101 // DfWriter.cpp
102 void write_xpt_(cpp11::list data, cpp11::strings path, int version, std::string name);
_haven_write_xpt_(SEXP data,SEXP path,SEXP version,SEXP name)103 extern "C" SEXP _haven_write_xpt_(SEXP data, SEXP path, SEXP version, SEXP name) {
104 BEGIN_CPP11
105 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));
106 return R_NilValue;
107 END_CPP11
108 }
109
110 extern "C" {
111 /* .Call calls */
112 extern SEXP _haven_df_parse_dta_file(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
113 extern SEXP _haven_df_parse_dta_raw(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
114 extern SEXP _haven_df_parse_por_file(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
115 extern SEXP _haven_df_parse_por_raw(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
116 extern SEXP _haven_df_parse_sas_file(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
117 extern SEXP _haven_df_parse_sas_raw(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
118 extern SEXP _haven_df_parse_sav_file(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
119 extern SEXP _haven_df_parse_sav_raw(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
120 extern SEXP _haven_df_parse_xpt_file(SEXP, SEXP, SEXP, SEXP, SEXP);
121 extern SEXP _haven_df_parse_xpt_raw(SEXP, SEXP, SEXP, SEXP, SEXP);
122 extern SEXP _haven_write_dta_(SEXP, SEXP, SEXP, SEXP);
123 extern SEXP _haven_write_sas_(SEXP, SEXP);
124 extern SEXP _haven_write_sav_(SEXP, SEXP, SEXP);
125 extern SEXP _haven_write_xpt_(SEXP, SEXP, SEXP, SEXP);
126 extern SEXP is_tagged_na_(SEXP, SEXP);
127 extern SEXP na_tag_(SEXP);
128 extern SEXP tagged_na_(SEXP);
129
130 static const R_CallMethodDef CallEntries[] = {
131 {"_haven_df_parse_dta_file", (DL_FUNC) &_haven_df_parse_dta_file, 6},
132 {"_haven_df_parse_dta_raw", (DL_FUNC) &_haven_df_parse_dta_raw, 6},
133 {"_haven_df_parse_por_file", (DL_FUNC) &_haven_df_parse_por_file, 7},
134 {"_haven_df_parse_por_raw", (DL_FUNC) &_haven_df_parse_por_raw, 7},
135 {"_haven_df_parse_sas_file", (DL_FUNC) &_haven_df_parse_sas_file, 8},
136 {"_haven_df_parse_sas_raw", (DL_FUNC) &_haven_df_parse_sas_raw, 8},
137 {"_haven_df_parse_sav_file", (DL_FUNC) &_haven_df_parse_sav_file, 7},
138 {"_haven_df_parse_sav_raw", (DL_FUNC) &_haven_df_parse_sav_raw, 7},
139 {"_haven_df_parse_xpt_file", (DL_FUNC) &_haven_df_parse_xpt_file, 5},
140 {"_haven_df_parse_xpt_raw", (DL_FUNC) &_haven_df_parse_xpt_raw, 5},
141 {"_haven_write_dta_", (DL_FUNC) &_haven_write_dta_, 4},
142 {"_haven_write_sas_", (DL_FUNC) &_haven_write_sas_, 2},
143 {"_haven_write_sav_", (DL_FUNC) &_haven_write_sav_, 3},
144 {"_haven_write_xpt_", (DL_FUNC) &_haven_write_xpt_, 4},
145 {"is_tagged_na_", (DL_FUNC) &is_tagged_na_, 2},
146 {"na_tag_", (DL_FUNC) &na_tag_, 1},
147 {"tagged_na_", (DL_FUNC) &tagged_na_, 1},
148 {NULL, NULL, 0}
149 };
150 }
151
R_init_haven(DllInfo * dll)152 extern "C" void R_init_haven(DllInfo* dll){
153 R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
154 R_useDynamicSymbols(dll, FALSE);
155 R_forceSymbols(dll, TRUE);
156 }
157