diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-12 20:45:33 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-12 20:45:33 -0400 |
commit | 092542a3bf056fac545f4b5a1062195569561fd3 (patch) | |
tree | f854942e66033567e47c8f227c357ef59daa7866 /src/value.h | |
parent | e0e181d2af4aff5ac6c253fe25737bf93bfb6996 (diff) | |
download | fork-ledger-092542a3bf056fac545f4b5a1062195569561fd3.tar.gz fork-ledger-092542a3bf056fac545f4b5a1062195569561fd3.tar.bz2 fork-ledger-092542a3bf056fac545f4b5a1062195569561fd3.zip |
Sorting expr now uses "-" to indicate descending
For example: -S payee,-date sorts 1) ascending by payee, then 2)
descending by date.
Diffstat (limited to 'src/value.h')
-rw-r--r-- | src/value.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/value.h b/src/value.h index 049d3d01..c84f507c 100644 --- a/src/value.h +++ b/src/value.h @@ -931,6 +931,17 @@ inline value_t& add_or_set_value(value_t& lhs, const T& rhs) { return lhs; } +struct sort_value_t +{ + bool inverted; + value_t value; + + sort_value_t() : inverted(false) {} +}; + +bool value_is_less_than(const std::list<sort_value_t>& left_values, + const std::list<sort_value_t>& right_values); + } // namespace ledger #endif // _VALUE_H |