|
From: Ferdinando A. <qf...@am...> - 2009-04-16 17:29:19
|
Hi Luigi >> - modified Event:Date() to return a const reference > > This doesn't give you anything [..] and forces any Event class to store > the date, thus preventing it from calculating the date on the fly. Agreed. It escaped me. I can revert it tomorrow >> - added static Event::hasOccurredFunction to encapsulate the hasOccurred logic to be used also by non-Event object > > If it's generic logic, it shouldn't be in the Event class, even as a > static method. Agreed again. I put it there just because the Event class documentation suggest that it should be the only place in the code that is affected directly by QL_TODAYS_PAYMENTS. I could take it out of the Event class and keep it in the same event.hpp file, or put it in its own file, as you prefer > Then again, if you want to use it somewhere else, it's > probably a sign that something else should be inherited from Event and > is currently missing. Agreed again, anyway it would require a lot of refactoring and I'm currently not up for it. The goal of this commit was to uniform the hasOccurred logic which was erratic for non-Event object, and I would keep this result. ciao -- Nando |