File tree Expand file tree Collapse file tree 5 files changed +49
-5
lines changed
Expand file tree Collapse file tree 5 files changed +49
-5
lines changed Original file line number Diff line number Diff line change 33 * src/api.cpp : added "long long" to the capabilities function.
44 * include/Rcpp/platform/compiler.h : demangling is definitely available
55 on all mac versions using gcc. No point is testing for OSX version.
6-
6+ * include/Rcpp/InputParameter.h : extra layer of abstraction to allow for
7+ custom handling of references etc ... used in RcppArmadillo
8+ * src/attributes.cpp : using InputParameter
9+ * DESCRIPTION: bump to 0.10.4.4
10+
7112013-09-12 Romain Francois <romain@r-enthusiasts.com>
812
913 * include/Rcpp/platform/compiler.h : patch submitted by Murray for better
Original file line number Diff line number Diff line change 11Package: Rcpp
22Title: Seamless R and C++ Integration
3- Version: 0.10.4.3
3+ Version: 0.10.4.4
44Date: $Date$
55Author: Dirk Eddelbuettel and Romain Francois, with contributions
66 by Douglas Bates, John Chambers and JJ Allaire
Original file line number Diff line number Diff line change 1+ // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2+ //
3+ // InputParameter.h: Rcpp R/C++ interface class library --
4+ //
5+ // Copyright (C) 2013 Dirk Eddelbuettel and Romain Francois
6+ //
7+ // This file is part of Rcpp.
8+ //
9+ // Rcpp is free software: you can redistribute it and/or modify it
10+ // under the terms of the GNU General Public License as published by
11+ // the Free Software Foundation, either version 2 of the License, or
12+ // (at your option) any later version.
13+ //
14+ // Rcpp is distributed in the hope that it will be useful, but
15+ // WITHOUT ANY WARRANTY; without even the implied warranty of
16+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+ // GNU General Public License for more details.
18+ //
19+ // You should have received a copy of the GNU General Public License
20+ // along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
21+
22+ #ifndef Rcpp__InputParameter__h
23+ #define Rcpp__InputParameter__h
24+
25+ namespace Rcpp {
26+
27+ template <typename T>
28+ class InputParameter {
29+ public:
30+ InputParameter (SEXP x_) : x(x_){}
31+
32+ inline operator T () { return as<T>(x) ; }
33+
34+ private:
35+ SEXP x ;
36+ } ;
37+
38+ }
39+
40+ #endif
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ namespace Rcpp{
110110#include < Rcpp/internal/export.h>
111111#include < Rcpp/internal/r_coerce.h>
112112#include < Rcpp/as.h>
113+ #include < Rcpp/InputParameter.h>
113114#include < Rcpp/is.h>
114115
115116#include < Rcpp/vector/VectorBase.h>
Original file line number Diff line number Diff line change @@ -2167,9 +2167,8 @@ namespace attributes {
21672167 for (size_t i = 0 ; i<arguments.size (); i++) {
21682168 const Argument& argument = arguments[i];
21692169
2170- ostr << " " << argument.type ().full_name () << " " << argument.name ()
2171- << " = " << " Rcpp::as<" << argument.type ().full_name () << " >("
2172- << argument.name () << " SEXP);" << std::endl;
2170+ ostr << " Rcpp::InputParameter< " << argument.type ().full_name () << " > " << argument.name ()
2171+ << " (" << argument.name () << " SEXP );" << std::endl;
21732172 }
21742173
21752174 ostr << " " ;
You can’t perform that action at this time.
0 commit comments