[Rcpp-commits] r811 - in pkg/Rcpp/src: . Rcpp

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Mar 1 15:02:14 CET 2010


Author: romain
Date: 2010-03-01 15:02:14 +0100 (Mon, 01 Mar 2010)
New Revision: 811

Removed:
   pkg/Rcpp/src/Named.cpp
Modified:
   pkg/Rcpp/src/Rcpp.h
   pkg/Rcpp/src/Rcpp/Named.h
Log:
move the Named code to the headers

Deleted: pkg/Rcpp/src/Named.cpp
===================================================================
--- pkg/Rcpp/src/Named.cpp	2010-03-01 13:58:18 UTC (rev 810)
+++ pkg/Rcpp/src/Named.cpp	2010-03-01 14:02:14 UTC (rev 811)
@@ -1,34 +0,0 @@
-// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
-//
-// Named.cpp: Rcpp R/C++ interface class library -- named object 
-//
-// Copyright (C) 2010	Dirk Eddelbuettel and Romain Francois
-//
-// This file is part of Rcpp.
-//
-// Rcpp is free software: you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 2 of the License, or
-// (at your option) any later version.
-//
-// Rcpp is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
-
-#include <Rcpp/Named.h> 
-
-namespace Rcpp{
-	
-	SEXP Named::getSEXP() const {
-		return object.asSexp() ;
-	}
-	
-	std::string Named::getTag() const{
-		return tag ;
-	}
-	
-} // namespace Rcpp

Modified: pkg/Rcpp/src/Rcpp/Named.h
===================================================================
--- pkg/Rcpp/src/Rcpp/Named.h	2010-03-01 13:58:18 UTC (rev 810)
+++ pkg/Rcpp/src/Rcpp/Named.h	2010-03-01 14:02:14 UTC (rev 811)
@@ -63,9 +63,9 @@
 		return *this ;
 	}
 	
-	SEXP getSEXP() const ; 
+	inline SEXP getSEXP() const { return object.asSexp() ; }
 	
-	std::string getTag() const ;
+	inline std::string getTag() const { return tag ; }
 	
 private:
 	RObject object ;

Modified: pkg/Rcpp/src/Rcpp.h
===================================================================
--- pkg/Rcpp/src/Rcpp.h	2010-03-01 13:58:18 UTC (rev 810)
+++ pkg/Rcpp/src/Rcpp.h	2010-03-01 14:02:14 UTC (rev 811)
@@ -65,6 +65,6 @@
 #include <Rcpp/Function.h>
 #include <Rcpp/WeakReference.h>
 
-// #define ARG(name) ::Rcpp::internal::NamedPlaceholderProxy name(#name) ;
+// #define ARG(name) ::Rcpp::Named name(#name) ;
 
 #endif



More information about the Rcpp-commits mailing list