From eb772893b00119ead26d8662d73460651cafe11d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 11 Nov 2009 01:17:29 -0500 Subject: Timeclock entries can now have notes Example of a tagged entry: i 2009/11/01 12:00:00 Account Payee ; :Foo: o 2009/11/01 13:00:00 Two spaces or a tab must separate account from payee, and payee from note. --- src/timelog.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/timelog.h') diff --git a/src/timelog.h b/src/timelog.h index 7d79af3e..d0519ce4 100644 --- a/src/timelog.h +++ b/src/timelog.h @@ -56,19 +56,21 @@ public: datetime_t checkin; account_t * account; string desc; + string note; time_xact_t() : account(NULL) { TRACE_CTOR(time_xact_t, ""); } time_xact_t(const datetime_t& _checkin, - account_t * _account = NULL, - const string& _desc = "") - : checkin(_checkin), account(_account), desc(_desc) { - TRACE_CTOR(time_xact_t, "const datetime_t&, account_t *, const string&"); + account_t * _account = NULL, + const string& _desc = "", + const string& _note = "") + : checkin(_checkin), account(_account), desc(_desc), note(_note) { + TRACE_CTOR(time_xact_t, "const datetime_t&, account_t *, string, string"); } time_xact_t(const time_xact_t& xact) : checkin(xact.checkin), account(xact.account), - desc(xact.desc) { + desc(xact.desc), note(xact.note) { TRACE_CTOR(time_xact_t, "copy"); } ~time_xact_t() throw() { @@ -79,7 +81,7 @@ public: class time_log_t { std::list time_xacts; - journal_t& journal; + journal_t& journal; public: time_log_t(journal_t& _journal) : journal(_journal) { @@ -89,11 +91,13 @@ public: void clock_in(const datetime_t& checkin, account_t * account = NULL, - const string& desc = ""); + const string& desc = "", + const string& note = ""); void clock_out(const datetime_t& checkin, account_t * account = NULL, - const string& desc = ""); + const string& desc = "", + const string& note = ""); }; } // namespace ledger -- cgit v1.2.3