@@ -50,8 +50,6 @@ namespace simple {
5050 inline void write_value ( Writer& writer, Rcpp::NumericVector& nv, bool unbox,
5151 int digits, bool numeric_dates ) {
5252
53- // Rcpp::Rcout << "unbox function" << std::endl;
54-
5553 Rcpp::CharacterVector cls = jsonify::utils::getRClass ( nv );
5654
5755 if ( !numeric_dates && jsonify::dates::is_in ( " Date" , cls ) ) {
@@ -89,9 +87,6 @@ namespace simple {
8987 inline void write_value ( Writer& writer, Rcpp::NumericVector& nv,
9088 int row, int digits, bool numeric_dates ) {
9189
92- // Rcpp::Rcout << "row fucntion " << std::endl;
93- // Rcpp::Rcout << "writing nv with row: " << row << std::endl;
94-
9590 Rcpp::CharacterVector cls = jsonify::utils::getRClass ( nv );
9691
9792 if ( !numeric_dates && jsonify::dates::is_in ( " Date" , cls ) ) {
@@ -169,7 +164,6 @@ namespace simple {
169164 inline void write_value ( Writer& writer, Rcpp::IntegerVector& iv, int row,
170165 bool numeric_dates, bool factors_as_string ) {
171166
172- // Rcpp::Rcout << "int vector" << std::endl;
173167 Rcpp::CharacterVector cls = jsonify::utils::getRClass ( iv );
174168
175169
@@ -192,14 +186,11 @@ namespace simple {
192186 int ele = 0 ;
193187 write_value ( writer, s, ele );
194188 } else {
195- // Rcpp::Rcout << "writing lvls: " << lvls << std::endl;
196- // Rcpp::Rcout << "row: " << row << std::endl;
197189 write_value ( writer, lvls, row );
198190 }
199191
200192 } else {
201193
202- // Rcpp::Rcout << "standard iv " << std::endl;
203194 if ( Rcpp::IntegerVector::is_na ( iv[ row ] ) ) {
204195 writer.Null ();
205196 } else {
@@ -268,34 +259,7 @@ namespace simple {
268259 }
269260 }
270261
271- // template < typename Writer, typename T >
272- // inline void write_value( Writer& writer, T& sexp, bool unbox,
273- // int digits, bool numeric_dates ) {
274- //
275- // bool factors_as_string = true;
276- // write_value( writer, sexp, unbox, digits, numeric_dates, factors_as_string );
277- // }
278- //
279- // template < typename Writer, typename T >
280- // inline void write_value( Writer& writer, T& sexp, bool unbox, int digits) {
281- //
282- // bool numeric_dates = true;
283- // write_value( writer, sexp, unbox, digits, numeric_dates );
284- // }
285- //
286- // template < typename Writer, typename T >
287- // inline void write_value( Writer& writer, T& sexp, bool unbox ) {
288- //
289- // int digits = -1;
290- // write_value( writer, sexp, unbox, digits );
291- // }
292- //
293- // template < typename Writer, typename T >
294- // inline void write_value( Writer& writer, T& sexp) {
295- //
296- // bool unbox = false;
297- // write_value( writer, sexp, unbox );
298- // }
262+
299263
300264 /*
301265 * template for R SEXPs for single-row from a vector
@@ -304,10 +268,6 @@ namespace simple {
304268 inline void write_value ( Writer& writer, SEXP sexp, int row,
305269 int digits, bool numeric_dates, bool factors_as_string) {
306270
307- // Rcpp::Rcout << "writing value: factors_as_string: " << factors_as_string << std::endl;
308-
309- // Rcpp::Rcout << "writing value from vector" << std::endl;
310-
311271 switch ( TYPEOF ( sexp ) ) {
312272 case REALSXP : {
313273 Rcpp::NumericVector nv = Rcpp::as< Rcpp::NumericVector >( sexp );
@@ -336,54 +296,6 @@ namespace simple {
336296 }
337297 }
338298
339- // template < typename Writer, typename T >
340- // inline void write_value( Writer& writer, T& sexp, size_t row, bool unbox,
341- // int digits, bool numeric_dates ) {
342- //
343- // bool factors_as_string = true;
344- // write_value( writer, sexp, row, unbox, digits, numeric_dates, factors_as_string );
345- // }
346- //
347- // template < typename Writer, typename T >
348- // inline void write_value( Writer& writer, T& sexp, size_t row, bool unbox, int digits) {
349- //
350- // bool numeric_dates = true;
351- // write_value( writer, sexp, row, unbox, digits, numeric_dates );
352- // }
353- //
354- // template < typename Writer, typename T >
355- // inline void write_value( Writer& writer, T& sexp, size_t row, bool unbox ) {
356- //
357- // int digits = -1;
358- // write_value( writer, sexp, row, unbox, digits );
359- // }
360- //
361- // template < typename Writer, typename T >
362- // inline void write_value( Writer& writer, T& sexp, size_t row) {
363- //
364- // bool unbox = false;
365- // write_value( writer, sexp, row, unbox );
366- // }
367-
368-
369- /*
370- * template for C++ single object types
371- */
372- // template < typename Writer, typename T >
373- // inline void write_value( Writer& writer, T& val, int digits = -1 ) {
374- // switch( TYPEOF( val ) ) {
375- // case REALSXP: {
376- // write_value( writer, val, digits );
377- // break;
378- // }
379- // default: {
380- // write_value( writer, val );
381- // break;
382- // }
383- // }
384- // }
385-
386-
387299 // ---------------------------------------------------------------------------
388300 // matrix values
389301 // ---------------------------------------------------------------------------
0 commit comments