[Rcpp-commits] r3620 - pkg/Rcpp/inst/skeleton

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri May 25 00:56:33 CEST 2012


Author: edd
Date: 2012-05-25 00:56:33 +0200 (Fri, 25 May 2012)
New Revision: 3620

Modified:
   pkg/Rcpp/inst/skeleton/Num.cpp
   pkg/Rcpp/inst/skeleton/rcpp_module.cpp
   pkg/Rcpp/inst/skeleton/stdVector.cpp
Log:
changed indentation below _class; better?


Modified: pkg/Rcpp/inst/skeleton/Num.cpp
===================================================================
--- pkg/Rcpp/inst/skeleton/Num.cpp	2012-05-24 19:28:18 UTC (rev 3619)
+++ pkg/Rcpp/inst/skeleton/Num.cpp	2012-05-24 22:56:33 UTC (rev 3620)
@@ -40,12 +40,12 @@
 
     class_<Num>( "Num" )
 	
-        .default_constructor()
+    .default_constructor()
 
-        // read and write property
-        .property( "x", &Num::getX, &Num::setX )
+    // read and write property
+    .property( "x", &Num::getX, &Num::setX )
 
-        // read-only property
-        .property( "y", &Num::getY )
-	;
+    // read-only property
+    .property( "y", &Num::getY )
+    ;
 }

Modified: pkg/Rcpp/inst/skeleton/rcpp_module.cpp
===================================================================
--- pkg/Rcpp/inst/skeleton/rcpp_module.cpp	2012-05-24 19:28:18 UTC (rev 3619)
+++ pkg/Rcpp/inst/skeleton/rcpp_module.cpp	2012-05-24 22:56:33 UTC (rev 3620)
@@ -74,13 +74,12 @@
               "documentation for foo " ) ;	
 	
     class_<World>( "World" )
-	
-        // expose the default constructor
-        .constructor()    
-	    
-        .method( "greet", &World::greet , "get the message" )
-        .method( "set", &World::set     , "set the message" )
-	;
+    // expose the default constructor
+    .constructor()    
+        
+    .method( "greet", &World::greet , "get the message" )
+    .method( "set", &World::set     , "set the message" )
+    ;
 }                     
 
 

Modified: pkg/Rcpp/inst/skeleton/stdVector.cpp
===================================================================
--- pkg/Rcpp/inst/skeleton/stdVector.cpp	2012-05-24 19:28:18 UTC (rev 3619)
+++ pkg/Rcpp/inst/skeleton/stdVector.cpp	2012-05-24 22:56:33 UTC (rev 3620)
@@ -57,34 +57,34 @@
     // we expose the class std::vector<double> as "vec" on the R side
     class_<vec>("vec")
     
-        // exposing the default constructor
-        .constructor() 
+    // exposing the default constructor
+    .constructor() 
 
-        // exposing member functions -- taken directly from std::vector<double>
-        .method( "size",     &vec::size)
-        .method( "max_size", &vec::max_size)
-        .method( "capacity", &vec::capacity)
-        .method( "empty",    &vec::empty)
-        .method( "reserve",  &vec::reserve)
-        .method( "pop_back", &vec::pop_back )
-        .method( "clear",    &vec::clear )
-        
-        // specifically exposing const member functions defined above
-        .method( "back",     &vec_back )
-        .method( "front",    &vec_front )
-        .method( "at",       &vec_at )
+    // exposing member functions -- taken directly from std::vector<double>
+    .method( "size",     &vec::size)
+    .method( "max_size", &vec::max_size)
+    .method( "capacity", &vec::capacity)
+    .method( "empty",    &vec::empty)
+    .method( "reserve",  &vec::reserve)
+    .method( "pop_back", &vec::pop_back )
+    .method( "clear",    &vec::clear )
     
-        // exposing free functions taking a std::vector<double>*
-        // as their first argument
-        .method( "assign",   &vec_assign )
-        .method( "insert",   &vec_insert )
-        .method( "as.vector",&vec_asR )
-        .method( "push_back",&vec_push_back )
-        .method( "resize",   &vec_resize)
+    // specifically exposing const member functions defined above
+    .method( "back",     &vec_back )
+    .method( "front",    &vec_front )
+    .method( "at",       &vec_at )
     
-        // special methods for indexing
-        .method( "[[",       &vec_at )
-        .method( "[[<-",     &vec_set )
+    // exposing free functions taking a std::vector<double>*
+    // as their first argument
+    .method( "assign",   &vec_assign )
+    .method( "insert",   &vec_insert )
+    .method( "as.vector",&vec_asR )
+    .method( "push_back",&vec_push_back )
+    .method( "resize",   &vec_resize)
+    
+    // special methods for indexing
+    .method( "[[",       &vec_at )
+    .method( "[[<-",     &vec_set )
 
-	;
+    ;
 }



More information about the Rcpp-commits mailing list