[Rcpp-commits] r3182 - pkg/Rcpp/inst/include pkg/Rcpp/inst/include/Rcpp pkg/Rcpp/inst/include/Rcpp/internal pkg/Rcpp/inst/include/Rcpp/module pkg/Rcpp/inst/include/Rcpp/sugar pkg/Rcpp/inst/include/Rcpp/traits pkg/Rcpp/inst/include/Rcpp/vector pkg/Rcpp/src scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Aug 27 00:33:20 CEST 2011
Author: edd
Date: 2011-08-27 00:33:19 +0200 (Sat, 27 Aug 2011)
New Revision: 3182
Modified:
pkg/Rcpp/inst/include/Rcpp.h
pkg/Rcpp/inst/include/Rcpp/DataFrame.h
pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h
pkg/Rcpp/inst/include/Rcpp/DateVector.h
pkg/Rcpp/inst/include/Rcpp/DatetimeVector.h
pkg/Rcpp/inst/include/Rcpp/Dimension.h
pkg/Rcpp/inst/include/Rcpp/DottedPair.h
pkg/Rcpp/inst/include/Rcpp/Environment.h
pkg/Rcpp/inst/include/Rcpp/Evaluator.h
pkg/Rcpp/inst/include/Rcpp/Formula.h
pkg/Rcpp/inst/include/Rcpp/Function.h
pkg/Rcpp/inst/include/Rcpp/Language.h
pkg/Rcpp/inst/include/Rcpp/Module.h
pkg/Rcpp/inst/include/Rcpp/Pairlist.h
pkg/Rcpp/inst/include/Rcpp/Promise.h
pkg/Rcpp/inst/include/Rcpp/RObject.h
pkg/Rcpp/inst/include/Rcpp/Reference.h
pkg/Rcpp/inst/include/Rcpp/S4.h
pkg/Rcpp/inst/include/Rcpp/Symbol.h
pkg/Rcpp/inst/include/Rcpp/WeakReference.h
pkg/Rcpp/inst/include/Rcpp/as.h
pkg/Rcpp/inst/include/Rcpp/internal/export.h
pkg/Rcpp/inst/include/Rcpp/module/Module_Field.h
pkg/Rcpp/inst/include/Rcpp/module/Module_Property.h
pkg/Rcpp/inst/include/Rcpp/module/Module_generated_CppFunction.h
pkg/Rcpp/inst/include/Rcpp/r_cast.h
pkg/Rcpp/inst/include/Rcpp/sugar/Range.h
pkg/Rcpp/inst/include/Rcpp/traits/Exporter.h
pkg/Rcpp/inst/include/Rcpp/vector/00_forward_eval_methods.h
pkg/Rcpp/inst/include/Rcpp/vector/Matrix.h
pkg/Rcpp/inst/include/Rcpp/vector/MatrixBase.h
pkg/Rcpp/inst/include/Rcpp/vector/MatrixColumn.h
pkg/Rcpp/inst/include/Rcpp/vector/MatrixRow.h
pkg/Rcpp/inst/include/Rcpp/vector/Vector.h
pkg/Rcpp/inst/include/RcppCommon.h
pkg/Rcpp/src/Date.cpp
pkg/Rcpp/src/DateVector.cpp
pkg/Rcpp/src/DatetimeVector.cpp
pkg/Rcpp/src/Dimension.cpp
pkg/Rcpp/src/DottedPair.cpp
pkg/Rcpp/src/Environment.cpp
pkg/Rcpp/src/Evaluator.cpp
pkg/Rcpp/src/Formula.cpp
pkg/Rcpp/src/Function.cpp
pkg/Rcpp/src/Language.cpp
pkg/Rcpp/src/Pairlist.cpp
pkg/Rcpp/src/Promise.cpp
pkg/Rcpp/src/RObject.cpp
pkg/Rcpp/src/Reference.cpp
pkg/Rcpp/src/S4.cpp
pkg/Rcpp/src/Symbol.cpp
pkg/Rcpp/src/WeakReference.cpp
pkg/Rcpp/src/r_cast.cpp
scripts/DataFrame.R
scripts/generator_Module_CppFunction.R
scripts/runExamples.sh
Log:
- this large patch removed exceptions specifications from the function
signatures, as first suggested by Darren Cook on rcpp-devel and as
subsequently mentioned on rcpp-core
- the change was made incrementally, and I ran maybe two dozen R CMD check
jobs in the process, it seems all fine; I will run the scripts I run
around releases next
- I also made a whitespace cleanup now that I made my peace with Emacs and
TABs: just say no! I changed the emacs initialization string at the top
of each file to set "indent-tabs-mode: nil" as well, I also ran M-x
untabify to remove existing tabs and let emacs reindent
Modified: pkg/Rcpp/inst/include/Rcpp/DataFrame.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DataFrame.h 2011-08-26 19:29:12 UTC (rev 3181)
+++ pkg/Rcpp/inst/include/Rcpp/DataFrame.h 2011-08-26 22:33:19 UTC (rev 3182)
@@ -1,4 +1,4 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// DataFrame.h: Rcpp R/C++ interface class library -- data frames
//
@@ -26,55 +26,55 @@
#include <Rcpp/Vector.h>
namespace Rcpp{
-
+
namespace internal{
- inline SEXP empty_data_frame(){
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return ::Rf_eval( ::Rf_lang1( dataFrameSym ), R_GlobalEnv ) ;
- }
+ inline SEXP empty_data_frame(){
+ SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
+ return ::Rf_eval( ::Rf_lang1( dataFrameSym ), R_GlobalEnv ) ;
+ }
}
-
+
class DataFrame : public List {
- public:
- DataFrame(): List( internal::empty_data_frame() ){}
-
- DataFrame(SEXP x) throw(not_compatible) : List(){
- set(x) ;
- }
-
- DataFrame( const DataFrame& other): List(other.asSexp()) {}
-
- DataFrame( const RObject::SlotProxy& proxy ) throw(not_compatible){ set(proxy); }
- DataFrame( const RObject::AttributeProxy& proxy ) throw(not_compatible){ set(proxy); }
-
- DataFrame& operator=( DataFrame& other){
- setSEXP( other.asSexp() ) ;
- return *this ;
- }
-
- DataFrame& operator=( SEXP x) throw( not_compatible) {
- set(x) ;
- return *this ;
- }
-
- ~DataFrame(){}
+ public:
+ DataFrame(): List( internal::empty_data_frame() ){}
+
+ DataFrame(SEXP x) : List(){
+ set(x) ;
+ }
+
+ DataFrame( const DataFrame& other): List(other.asSexp()) {}
+
+ DataFrame( const RObject::SlotProxy& proxy ) { set(proxy); }
+ DataFrame( const RObject::AttributeProxy& proxy ) { set(proxy); }
+
+ DataFrame& operator=( DataFrame& other){
+ setSEXP( other.asSexp() ) ;
+ return *this ;
+ }
+
+ DataFrame& operator=( SEXP x) {
+ set(x) ;
+ return *this ;
+ }
+
+ ~DataFrame(){}
- static DataFrame create(){ return DataFrame() ; }
-
-#include <Rcpp/DataFrame_generated.h>
+ static DataFrame create(){ return DataFrame() ; }
+
+#include <Rcpp/DataFrame_generated.h>
private:
- void set(SEXP x) throw(not_compatible) {
- if( ::Rf_inherits( x, "data.frame" )){
- setSEXP( x ) ;
- } else{
- SEXP y = internal::convert_using_rfunction( x, "as.data.frame" ) ;
- setSEXP( y ) ;
- }
- }
-
+ void set(SEXP x) {
+ if( ::Rf_inherits( x, "data.frame" )){
+ setSEXP( x ) ;
+ } else{
+ SEXP y = internal::convert_using_rfunction( x, "as.data.frame" ) ;
+ setSEXP( y ) ;
+ }
+ }
+
} ;
-
+
}
#endif
Modified: pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h 2011-08-26 19:29:12 UTC (rev 3181)
+++ pkg/Rcpp/inst/include/Rcpp/DataFrame_generated.h 2011-08-26 22:33:19 UTC (rev 3182)
@@ -1,5 +1,4 @@
-
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// DataFrame_generated.h: Rcpp R/C++ interface class library -- data frames
//
@@ -26,221 +25,201 @@
template <typename T1>
-static DataFrame create( const T1& t1 ) throw(not_compatible) {
+static DataFrame create( const T1& t1 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2>
-static DataFrame create( const T1& t1, const T2& t2 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
-static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ) throw(not_compatible) {
+static DataFrame create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ) {
try{
- SEXP dataFrameSym = ::Rf_install( "data.frame"); // cannot be gc()ed once in symbol table
- return DataFrame(internal::try_catch(::Rf_lcons(dataFrameSym, pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20))));
+ return DataFrame(internal::try_catch(::Rcpp_lcons( ::Rf_install( "data.frame"), pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20 ) )));
} catch( eval_error& __ex__){
- throw not_compatible("error calling the data.frame function") ;
+ throw not_compatible("error calling the data.frame function") ;
}
}
Modified: pkg/Rcpp/inst/include/Rcpp/DateVector.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DateVector.h 2011-08-26 19:29:12 UTC (rev 3181)
+++ pkg/Rcpp/inst/include/Rcpp/DateVector.h 2011-08-26 22:33:19 UTC (rev 3182)
@@ -1,4 +1,4 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// DateVector.h: Rcpp R/C++ interface class library -- Date vector support
//
@@ -26,37 +26,36 @@
namespace Rcpp {
- class DateVector {
- public:
- typedef std::vector<Date>::iterator iterator;
- typedef std::vector<Date>::const_iterator const_iterator;
-
- // TODO: use a custom exception class instead of std::range_error
- DateVector(SEXP vec) throw(std::range_error);
- DateVector(int n);
- ~DateVector() {};
+ class DateVector {
+ public:
+ typedef std::vector<Date>::iterator iterator;
+ typedef std::vector<Date>::const_iterator const_iterator;
+
+ DateVector(SEXP vec);
+ DateVector(int n);
+ ~DateVector() {};
- const Date& operator()(int i) const throw(std::range_error);
- Date& operator()(int i) throw(std::range_error);
+ const Date& operator()(int i) const;
+ Date& operator()(int i);
- const Date& operator[](int i) const throw(std::range_error);
- Date& operator[](int i) throw(std::range_error);
+ const Date& operator[](int i) const;
+ Date& operator[](int i);
- int size() const;
+ int size() const;
- std::vector<Date> getDates() const;
-
- inline iterator begin(){ return v.begin(); }
- inline iterator end(){ return v.end(); }
-
- inline const_iterator begin() const { return v.begin(); }
- inline const_iterator end() const { return v.end(); }
-
- inline operator SEXP() const { return wrap( v ) ; }
-
- private:
- std::vector<Date> v;
- };
+ std::vector<Date> getDates() const;
+
+ inline iterator begin(){ return v.begin(); }
+ inline iterator end(){ return v.end(); }
+
+ inline const_iterator begin() const { return v.begin(); }
+ inline const_iterator end() const { return v.end(); }
+
+ inline operator SEXP() const { return wrap( v ) ; }
+
+ private:
+ std::vector<Date> v;
+ };
}
#endif
Modified: pkg/Rcpp/inst/include/Rcpp/DatetimeVector.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DatetimeVector.h 2011-08-26 19:29:12 UTC (rev 3181)
+++ pkg/Rcpp/inst/include/Rcpp/DatetimeVector.h 2011-08-26 22:33:19 UTC (rev 3182)
@@ -1,4 +1,4 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// DatetimeVector.h: Rcpp R/C++ interface class library -- Datetime vector
//
@@ -26,37 +26,36 @@
namespace Rcpp {
- class DatetimeVector {
- public:
- typedef std::vector<Datetime>::iterator iterator;
- typedef std::vector<Datetime>::const_iterator const_iterator;
-
- // TODO: use a custom exception class instead of std::range_error
- DatetimeVector(SEXP vec) throw(std::range_error);
- DatetimeVector(int n);
- ~DatetimeVector() {};
+ class DatetimeVector {
+ public:
+ typedef std::vector<Datetime>::iterator iterator;
+ typedef std::vector<Datetime>::const_iterator const_iterator;
+
+ DatetimeVector(SEXP vec);
+ DatetimeVector(int n);
+ ~DatetimeVector() {};
- const Datetime& operator()(int i) const throw(std::range_error);
- Datetime& operator()(int i) throw(std::range_error);
+ const Datetime& operator()(int i) const;
+ Datetime& operator()(int i);
- const Datetime& operator[](int i) const throw(std::range_error);
- Datetime& operator[](int i) throw(std::range_error);
+ const Datetime& operator[](int i) const;
+ Datetime& operator[](int i);
- int size() const;
+ int size() const;
- std::vector<Datetime> getDatetimes() const;
-
- inline iterator begin(){ return v.begin(); }
- inline iterator end(){ return v.end(); }
-
- inline const_iterator begin() const { return v.begin(); }
- inline const_iterator end() const { return v.end(); }
-
- inline operator SEXP() const { return wrap( v ) ; }
-
- private:
- std::vector<Datetime> v;
- };
+ std::vector<Datetime> getDatetimes() const;
+
+ inline iterator begin(){ return v.begin(); }
+ inline iterator end(){ return v.end(); }
+
+ inline const_iterator begin() const { return v.begin(); }
+ inline const_iterator end() const { return v.end(); }
+
+ inline operator SEXP() const { return wrap( v ) ; }
+
+ private:
+ std::vector<Datetime> v;
+ };
}
#endif
Modified: pkg/Rcpp/inst/include/Rcpp/Dimension.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Dimension.h 2011-08-26 19:29:12 UTC (rev 3181)
+++ pkg/Rcpp/inst/include/Rcpp/Dimension.h 2011-08-26 22:33:19 UTC (rev 3182)
@@ -1,4 +1,4 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// Dimension.h: Rcpp R/C++ interface class library -- dimensions
//
@@ -26,8 +26,8 @@
namespace Rcpp{
-class Dimension {
-public:
+ class Dimension {
+ public:
typedef std::vector<int>::reference reference ;
typedef std::vector<int>::const_reference const_reference ;
@@ -43,12 +43,12 @@
int size() const ;
int prod() const ;
- reference operator[](int i) throw(std::range_error) ;
- const_reference operator[](int i) const throw(std::range_error) ;
+ reference operator[](int i);
+ const_reference operator[](int i) const;
-private:
- std::vector<int> dims ;
-} ;
+ private:
+ std::vector<int> dims;
+ };
}
#endif
Modified: pkg/Rcpp/inst/include/Rcpp/DottedPair.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DottedPair.h 2011-08-26 19:29:12 UTC (rev 3181)
+++ pkg/Rcpp/inst/include/Rcpp/DottedPair.h 2011-08-26 22:33:19 UTC (rev 3182)
@@ -98,7 +98,7 @@
* @param object object to wrap
*/
template <typename T>
- void insert( const size_t& index, const T& object) throw(index_out_of_bounds) {
+ void insert( const size_t& index, const T& object) {
if( index == 0 ) {
push_front( object ) ;
} else{
@@ -126,7 +126,7 @@
* @param object object that can be wrapped
*/
template <typename T>
- void replace( const int& index, const T& object ) throw(index_out_of_bounds){
+ void replace( const int& index, const T& object ) {
if( static_cast<R_len_t>(index) >= ::Rf_length(m_sexp) ) throw index_out_of_bounds() ;
/* pretend we do a pairlist so that we get Named to work for us */
@@ -148,11 +148,11 @@
*
* @param index position where the element is to be removed
*/
- void remove( const size_t& index ) throw(index_out_of_bounds) ;
+ void remove( const size_t& index );
class Proxy {
public:
- Proxy( DottedPair& v, const size_t& index_ ) throw(index_out_of_bounds) ;
+ Proxy( DottedPair& v, const size_t& index_ );
/* lvalue uses */
Proxy& operator=(const Proxy& rhs) ;
Modified: pkg/Rcpp/inst/include/Rcpp/Environment.h
===================================================================
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/rcpp -r 3182
More information about the Rcpp-commits
mailing list