Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | The Great Renaming, Part II | John Wiegley | 2009-02-23 | 1 | -8/+8 |
| | | | | | The last commit did not contain the majority of changes because of a slight mishap. This contains the real changeset. | ||||
* | Create a new interactive_t helper class | John Wiegley | 2009-02-21 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this class is much like Emacs' (interactive) form: it allows a value expression function to declare exactly how many arguments, and of what type, it intends to receive. It then offers type-safe access to theese arguments in a consistent manner. An example value expression function definition in C++: value_t fn_foo(call_scope_t& scope) { // We expect a string, an integer, and an optional date interactive_t args(scope, "sl&d"); std::cout << "String = " << args.get<string>(0) << "Integer = " << args.get<long>(1) << std::endl; if (args.has(2)) // was a date provided? std::cout << "Date = " << args.get<date_t>(2) << std::endl; return NULL_VALUE; } There is also an in_context_t<T> template, which finds the context type T in the current scope hierarchy. The in_context_t then also acts as a smart pointer to reference this context object, in addition to serving the same duty as interactive_t. This combination of intent is solely for the sake of brevity. value_t fn_bar(call_scope_t& scope) { in_context_t<account_t> env(scope, "sl&d"); std::cout << "Account name = " << env->fullname() << "String arg = " << env.get<string>(0) << std::endl; return NULL_VALUE; } As you can see here, 'env' acts as a smart pointer to the required context, and an object to extract the typed arguments. | ||||
* | Added a --strict session option | John Wiegley | 2009-02-19 | 1 | -1/+1 |
| | | | | | | | When enabled, if any accounts or commodities are seen in an uncleared transaction, which were not seen previously in a cleared or pending transaction or a textual directive dealing with accounts or commodities, a warning is generated about the unknown item. | ||||
* | Strip annotations from the "parse" result | John Wiegley | 2009-02-15 | 1 | -1/+1 |
| | | | | This way the value shown follows the current reporting options. | ||||
* | Greatly improved output from the "format" command | John Wiegley | 2009-02-13 | 1 | -21/+43 |
| | | | | | It now shows the formatted result against a sample entry, similar to what "parse" now does. | ||||
* | Wired up the "entry" command from 2.x, though it still needs to be ported. | John Wiegley | 2009-02-10 | 1 | -19/+0 |
| | |||||
* | Break libledger_data's dependency on session_t. | John Wiegley | 2009-02-09 | 1 | -0/+1 |
| | |||||
* | For the "parse" pre-command, provide a sample transaction context. | John Wiegley | 2009-02-09 | 1 | -4/+26 |
| | |||||
* | Join command-line arguments before handling pre-commands. | John Wiegley | 2009-02-09 | 1 | -26/+29 |
| | |||||
* | Repaired the output of the "eval" command. | John Wiegley | 2009-02-08 | 1 | -9/+16 |
| | |||||
* | Correction to debug output. | John Wiegley | 2009-02-07 | 1 | -1/+2 |
| | |||||
* | Fixed the debug output of the pre-command "args". | John Wiegley | 2009-02-07 | 1 | -3/+2 |
| | |||||
* | Restored all the option handlers from 2.6.2, but not the options themselves. | John Wiegley | 2009-02-06 | 1 | -1/+1 |
| | |||||
* | Largely removed all of Ledger's use of global variables, for the REPL's sake. | John Wiegley | 2009-02-04 | 1 | -3/+4 |
| | |||||
* | Removed the binary caching code, and the XML, QIF and Gnucash parsers. | John Wiegley | 2009-02-03 | 1 | -3/+0 |
| | |||||
* | Moved the pre-commands to their own file, and created new "args" command. | John Wiegley | 2009-02-01 | 1 | -0/+167 |