Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use #pragma once | Alexis Hildebrandt | 2023-04-10 | 1 | -4/+1 |
| | |||||
* | Update copyright year | Alexis Hildebrandt | 2023-02-02 | 1 | -1/+1 |
| | | | | [skip ci] | ||||
* | Update copyright statement for 2022 | Alexis Hildebrandt | 2022-07-02 | 1 | -1/+1 |
| | |||||
* | Change header guard names to use `INCLUDED_` prefix | Phil Newton | 2022-04-06 | 1 | -3/+3 |
| | | | | Fixes #2049 | ||||
* | [misc] Update year in copyright notice to 2017 | Alexis Hildebrandt | 2018-01-27 | 1 | -1/+1 |
| | | | | [ci skip] | ||||
* | [misc] Update year in copyright notice to 2017 | Alexis Hildebrandt | 2017-01-05 | 1 | -1/+1 |
| | | | | [ci skip] | ||||
* | [misc] Update year in copyright notice to 2016 | Alexis Hildebrandt | 2016-01-02 | 1 | -1/+1 |
| | | | | [ci skip] | ||||
* | Bump copyright notice to 2015 | Alexis Hildebrandt | 2014-12-27 | 1 | -1/+1 |
| | | | | | | The following script makes it a no-brainer: % NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \ | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/" | ||||
* | Bump copyright information to 2014 | Alexis Hildebrandt | 2014-02-02 | 1 | -1/+1 |
| | |||||
* | Bump copyright information to 2013 | John Wiegley | 2013-02-18 | 1 | -1/+1 |
| | |||||
* | Increased file copyrights to 2012 | John Wiegley | 2012-02-29 | 1 | -1/+1 |
| | |||||
* | Updated copyrights to 2003-2010 | John Wiegley | 2010-03-05 | 1 | -1/+1 |
| | |||||
* | Renamed the "args" command to "query" | John Wiegley | 2010-03-04 | 1 | -1/+1 |
| | |||||
* | Removed a bunch of empty comments | John Wiegley | 2009-11-08 | 1 | -4/+0 |
| | |||||
* | Create a new interactive_t helper class | John Wiegley | 2009-02-21 | 1 | -1/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | Moved the pre-commands to their own file, and created new "args" command. | John Wiegley | 2009-02-01 | 1 | -0/+61 |