[Rcpp-commits] r3815 - pkg/RcppBDT/inst/include

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 23 15:59:09 CEST 2012


Author: edd
Date: 2012-10-23 15:59:09 +0200 (Tue, 23 Oct 2012)
New Revision: 3815

Modified:
   pkg/RcppBDT/inst/include/RcppBDTdt.h
Log:
two more ctors


Modified: pkg/RcppBDT/inst/include/RcppBDTdt.h
===================================================================
--- pkg/RcppBDT/inst/include/RcppBDTdt.h	2012-10-23 13:48:01 UTC (rev 3814)
+++ pkg/RcppBDT/inst/include/RcppBDTdt.h	2012-10-23 13:59:09 UTC (rev 3815)
@@ -28,6 +28,8 @@
     bdtDt()  				{ setFromLocalClock(); } 	// default empty constructor, using epoch
     bdtDt(SEXP dt) 			{ setDate(dt); } 		// constructor from SEXP using R Date
     bdtDt(int year, int month, int day) : m_dt(year, month, day) { } 	// constructor using year, month, day
+    bdtDt(boost::gregorian::date dt) : m_dt(dt) {} 
+    bdtDt(const bdtDt& other) : m_dt(other.m_dt) {}
 
     // these set the date from the clock, in local or universal time
     void setFromLocalClock()		{ m_dt = boost::gregorian::date(boost::gregorian::day_clock::local_day()); }



More information about the Rcpp-commits mailing list