Commit graph

13 commits

Author SHA1 Message Date
John Wiegley
f6f4a46cf5 Moved around most of the files so that source code is in src/, documentation
is in doc/, etc.
2008-08-05 18:05:49 -04:00
John Wiegley
9c9a34388a First round of work to get the balance report working again. 2008-08-04 16:24:41 -04:00
John Wiegley
bcffbc96ba Regular expressions are working again, such that very basic register reports
are now possible.
2008-08-03 23:44:18 -04:00
John Wiegley
8a21391d0a Got pre-compiled headers working again, which are used if --devel is passed to
acprep.
2008-08-03 22:30:43 -04:00
John Wiegley
363fb6d558 Got date, payee and accounts back into the register report. 2008-08-03 00:22:55 -04:00
John Wiegley
5a90fe7357 Moved xact_xdata_t into xact_t itself, as a set of "extended data" that might
be gathered during reporting.

Removed the references to accounts and such from the mask logic, which means
that the value expression "acount =~ /foo/" is needed in place of just
"/foo/".
2008-08-02 22:45:35 -04:00
John Wiegley
e52a6a9bd8 More infrastructure work toward getting journal objects to provide their own
information in an abstract manner.
2008-08-02 16:32:16 -04:00
John Wiegley
9a9e06554e Formatting now relies exclusively on value expressions.
What this means is that the utility code, basic math, value expressions,
string formatting and option handling are now entirely decoupled from the rest
of the code.  This decoupling not only greatly simplifies the more basic parts
of Ledger, but makes it much easier to test and verify its completeness.

For example, when the formatting code %X is seen by the format parser, it
turns into a call to the expression function fmt_X, which must be defined when
the format string is first compiled against an object.  If that object is a
transaction, the transaction's scope will be the first to have a chance at
providing a definition.  If an account is being reported, it will.  If neither
does, the next scope in sequence -- soon to be the current report -- will, and
then the session object that "owns" the current Ledger session.

In 2.6, the formatting code new everything about transaction and accounts, and
relied on flags to communicate special details between them.  Now the
transaction will offer the details for its own reporting, while the formatter
worries only about strings and how to output them.
2008-08-02 06:42:36 -04:00
John Wiegley
858978de89 Journal data structures now use date_t instead of datetime_t.
This means transactions can only have day-level granularity -- which has
always been the case from an data file point of view.  The advantage to this
restriction is that reports will now be immune from daylight savings related
bugs, where a transaction falls to the wrong side of a --monthly report, for
example.
2008-08-01 17:37:22 -04:00
John Wiegley
e5048ec71b Change many uses of for+iterator to use Boost.Foreach. 2008-07-31 17:48:29 -04:00
John Wiegley
99313ebc6c Revised the way that exceptions are thrown around. Instead of context being a
complicated string of pointers, it's now just a global block of text that gets
appended to as the error is being thrown up, and can be displayed at the catch
point if desired.  There are almost no cases where a thrown exception will not
result in an error message being displayed to the user.
2008-07-31 06:24:45 -04:00
John Wiegley
42e1d725aa The next value expression scheme is working, but the individual accessor
functions for each of the journal objects has yet to be ported.
2008-07-29 21:05:08 -04:00
John Wiegley
ea27d1b45a Moved around and renamed a very large amount of code in order to rationalize
the way that value expressions extract information from journal objects.
2008-07-29 20:10:03 -04:00