[Rcpp-commits] r1686 - pkg/Rcpp/inst/include/Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jun 23 20:55:12 CEST 2010
Author: romain
Date: 2010-06-23 20:55:12 +0200 (Wed, 23 Jun 2010)
New Revision: 1686
Modified:
pkg/Rcpp/inst/include/Rcpp/DateVector.h
Log:
adding iterator, begin, end
Modified: pkg/Rcpp/inst/include/Rcpp/DateVector.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/DateVector.h 2010-06-23 18:49:25 UTC (rev 1685)
+++ pkg/Rcpp/inst/include/Rcpp/DateVector.h 2010-06-23 18:55:12 UTC (rev 1686)
@@ -29,6 +29,9 @@
class DateVector {
public:
+ typedef std::vector<Date>::iterator iterator ;
+ typedef std::vector<Date>::const_iterator const_iterator ;
+
DateVector(SEXP vec);
DateVector(int n);
~DateVector() {};
@@ -38,6 +41,13 @@
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 const_iterator begin() const { return v.begin() ; }
+ inline const_iterator end() const { return v.end() ; }
+
private:
std::vector<Date> v;
};
More information about the Rcpp-commits
mailing list