diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-02 06:42:36 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-02 06:42:36 -0400 |
commit | 9a9e06554eb9f57be8c839fb0af49a0473614172 (patch) | |
tree | c31019afc5a482ff3daeb8cf672af22a0910d5a3 /expr.h | |
parent | 5bf3f536b37e77b5dd663fffbd32e71b403d2c7a (diff) | |
download | fork-ledger-9a9e06554eb9f57be8c839fb0af49a0473614172.tar.gz fork-ledger-9a9e06554eb9f57be8c839fb0af49a0473614172.tar.bz2 fork-ledger-9a9e06554eb9f57be8c839fb0af49a0473614172.zip |
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.
Diffstat (limited to 'expr.h')
-rw-r--r-- | expr.h | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -107,8 +107,6 @@ public: void print(std::ostream& out, scope_t& scope) const; void dump(std::ostream& out) const; - - void read(std::ostream& in); void read(const char *& data); void write(std::ostream& out) const; |