From da51f5b51051bdc6a0fe10325a3b8b1a2f30d21d Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Tue, 13 May 2014 16:08:10 +0100 Subject: support payee uuid directive The semantics of this are a little bit tricky: we want, if we come across a transaction with exactly the given UUID, to set the transaction's payee to be the specified one. We need to set that payee before the first post in the transaction is parsed, otherwise that post will inherit the wrong payee; however, we need to do it after the transaction's tags have been parsed. The implementation as it is in this commit is potentially a little wasteful, if there are post-like (non-comment non-assertion) entries in the transaction that don't successfully parse as posts. --- src/journal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/journal.h') diff --git a/src/journal.h b/src/journal.h index 4458ba93..803b9511 100644 --- a/src/journal.h +++ b/src/journal.h @@ -63,6 +63,8 @@ typedef std::list auto_xacts_list; typedef std::list period_xacts_list; typedef std::pair payee_alias_mapping_t; typedef std::list payee_alias_mappings_t; +typedef std::pair payee_uuid_mapping_t; +typedef std::list payee_uuid_mappings_t; typedef std::pair account_mapping_t; typedef std::list account_mappings_t; typedef std::map accounts_map; @@ -134,6 +136,7 @@ public: bool recursive_aliases; bool no_aliases; payee_alias_mappings_t payee_alias_mappings; + payee_uuid_mappings_t payee_uuid_mappings; account_mappings_t account_mappings; accounts_map account_aliases; account_mappings_t payees_for_unknown_accounts; -- cgit v1.2.3