summaryrefslogtreecommitdiff
path: root/src/scope.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Whitespace fixJohn Wiegley2009-11-041-5/+5
|
* Added missing TRACE_CTOR callsJohn Wiegley2009-11-011-1/+3
|
* Added serialization methods for most typeJohn Wiegley2009-10-301-2/+64
| | | | | This allows journal_t objects to be completed serialized to disk and deserialized.
* Reduced the #include dependency tree to a minimumJohn Wiegley2009-03-041-1/+0
|
* Marked all strings needing internationalizationJohn Wiegley2009-02-251-1/+1
| | | | | | | | | | | | | | | | These strings are now collected automagically in the file po/ledger.pot. If you'd like to produce a translation, just run this command after building Ledger: msginit -l LOCALE -o LANG.po -i po/ledger.pot Where LOCALE is a string like de or en_GB, and LANG is a short descriptive word for your language. Then send me this .po file so I can commit it to the Ledger sources (alternatively, you could maintain the file in a fork on GitHub), and setup the build script to format and install your new message catalog during a "make install".
* Removed some dead codeJohn Wiegley2009-02-241-38/+0
|
* Create a new interactive_t helper classJohn Wiegley2009-02-211-96/+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 --flat option, to flatten the balance reportJohn Wiegley2009-02-171-0/+9
|
* Fixed several unused value and param warningsJohn Wiegley2009-02-161-1/+1
|
* Moved around some functions for clarityJohn Wiegley2009-02-161-0/+2
|
* Wired up the "entry" command from 2.x, though it still needs to be ported.John Wiegley2009-02-101-0/+7
|
* Added support for value expression definitions.John Wiegley2009-02-081-6/+11
| | | | | | | | Example: ] expr f(x) := x + 100 ] expr f(100) 200
* Allow value expressions to gain access to option settings.John Wiegley2009-02-071-0/+3
| | | | | | | | | | For example, "ledger eval options.limit" prints 0 (for false), but: "ledger -l hello eval options.limit" print "hello"s, since the value of options.limit, once set to a value, is that string. For flag options, such as -Y, eval prints 0 if unset, and 1 if set. This feature allows value expressions to be conditionalized based on the presence of user options.
* Refer to empty expression operators as simply NULL.John Wiegley2009-02-071-1/+1
|
* Largely removed all of Ledger's use of global variables, for the REPL's sake.John Wiegley2009-02-041-17/+60
|
* Fixed some warnings caused by using g++ 4.3.John Wiegley2009-02-021-5/+5
|
* Added documentation stubs for all include files and classes.John Wiegley2009-01-311-0/+44
|
* Stopped using the generic "unsigned int" in favor of more specific types.John Wiegley2009-01-291-6/+6
|
* Increased copyright range to include 2009.John Wiegley2009-01-201-1/+1
|
* Allow var_t<datetime_t>.John Wiegley2009-01-191-0/+9
|
* When setting a scope's argument, convert the list to a sequence if it's notJohn Wiegley2009-01-191-2/+4
| | | | already.
* Corrected the way that scopes are found so that xact_t can also be found as anJohn Wiegley2008-10-291-32/+16
| | | | item_t (which it also is).
* Removed todo comments and dead code.John Wiegley2008-08-171-2/+0
|
* The register report is now mostly displaying multi-line balances correctly.John Wiegley2008-08-101-10/+10
| | | | It still shows lots even when --lots isn't specified, though.
* Regular expressions supplied after 'reg' or 'bal' are working again.John Wiegley2008-08-101-0/+2
|
* Moved around most of the files so that source code is in src/, documentationJohn Wiegley2008-08-051-0/+280
is in doc/, etc.