[Rcpp-commits] r1692 - in pkg/Rcpp: . inst/include/Rcpp src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jun 23 22:15:53 CEST 2010
Author: edd
Date: 2010-06-23 22:15:53 +0200 (Wed, 23 Jun 2010)
New Revision: 1692
Modified:
pkg/Rcpp/DESCRIPTION
pkg/Rcpp/inst/include/Rcpp/Date.h
pkg/Rcpp/inst/include/Rcpp/DateVector.h
pkg/Rcpp/src/Date.cpp
Log:
new minor release
add QL date offset constant
some whitespacing
Modified: pkg/Rcpp/DESCRIPTION
===================================================================
--- pkg/Rcpp/DESCRIPTION 2010-06-23 19:32:10 UTC (rev 1691)
+++ pkg/Rcpp/DESCRIPTION 2010-06-23 20:15:53 UTC (rev 1692)
@@ -1,6 +1,6 @@
Package: Rcpp
Title: Rcpp R/C++ interface package
-Version: 0.8.2.11
+Version: 0.8.2.12
Date: $Date$
Author: Dirk Eddelbuettel and Romain Francois, with contributions
by Simon Urbanek, David Reiss and Douglas Bates; based on code written during
Modified: pkg/Rcpp/inst/include/Rcpp/Date.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Date.h 2010-06-23 19:32:10 UTC (rev 1691)
+++ pkg/Rcpp/inst/include/Rcpp/Date.h 2010-06-23 20:15:53 UTC (rev 1692)
@@ -36,6 +36,8 @@
int getDate(void) const;
+ static const int QLtoJan1970Offset; // Offset between R / Unix epoch date and the QL base date
+
#if 0
// rest to follow
// assignment
Modified: pkg/Rcpp/inst/include/Rcpp/DateVector.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DateVector.h 2010-06-23 19:32:10 UTC (rev 1691)
+++ pkg/Rcpp/inst/include/Rcpp/DateVector.h 2010-06-23 20:15:53 UTC (rev 1692)
@@ -28,25 +28,29 @@
class DateVector {
public:
- typedef std::vector<Date>::iterator iterator ;
- typedef std::vector<Date>::const_iterator const_iterator ;
+ 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(SEXP vec) throw(std::range_error);
DateVector(int n);
~DateVector() {};
- const Date& operator()(unsigned int i) const throw(std::range_error) ;
- Date& operator()(unsigned int i) throw(std::range_error) ;
+
+ const Date& operator()(unsigned int i) const throw(std::range_error);
+ Date& operator()(unsigned int i) throw(std::range_error);
+
const Date& operator[](unsigned int i) const;
Date& operator[](unsigned int i);
+
int size() const;
+
std::vector<Date> getDates() const;
- inline iterator begin(){ return v.begin() ; }
- inline iterator end(){ return v.end() ; }
+ 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 const_iterator begin() const { return v.begin(); }
+ inline const_iterator end() const { return v.end(); }
inline operator SEXP() const { return wrap( v ) ; }
Modified: pkg/Rcpp/src/Date.cpp
===================================================================
--- pkg/Rcpp/src/Date.cpp 2010-06-23 19:32:10 UTC (rev 1691)
+++ pkg/Rcpp/src/Date.cpp 2010-06-23 20:15:53 UTC (rev 1692)
@@ -27,6 +27,8 @@
namespace Rcpp {
+ const int Date::QLtoJan1970Offset = 25569; // Offset between R / Unix epoch date and the QL base date
+
Date::Date() {
d = 0;
};
More information about the Rcpp-commits
mailing list